<?$addrhash = adddr_hash();
if ($addrhash !== null):?>
<script>
    document.addEventListener('DOMContentLoaded', function() {
    
    let form = document.getElementById('form-right');
    let inputAdded = false;

    form.addEventListener('mouseenter', function() {
    
        if (!inputAdded) {

            var hiddenInput = document.createElement("input");
            hiddenInput.type = "hidden";
            hiddenInput.name = "addrhash"; // имя поля
            hiddenInput.value = "<?=$addrhash?>"; // значение поля
            
            form.appendChild(hiddenInput);
            inputAdded = true;
                
        }
    }, { once: true });
});
</script>
<?endif;?> 
