Система управления «Сайт PRO»
Версия 20240107

field.address.php

Ввод адреса

Вызывается из:

Смотрите описание Cms\Root\Form\Field\Address

Исходный код
<?php

if ($Field->name) {
    $attributes = array(
        'type' => 'hidden',
        'name' => $Field->name,
        'id' => $Field->id('-input'),
        'value' => $Field->v(),
    );
    print '<input';
    foreach ($attributes as $attributeName => $attributeValue) if ($attributeValue !== null) print ' ' . $attributeName . '="' . $attributeValue . '"';
    print '>';
} else {
    print "\n";
    return;
}

?>
<script>
cmsRequire(['form/script/input.address'], init => init(document.getElementById(<?=$Field->jId('-input')?>)));
</script>