КОНТРОЛЫ/phone.md


Исходный код

Twig код

<div class="js-control-phone control-phone">
  {% include "interface/controls/input.twig" with {
    value: value|phone,
    name: '',
    class_name: 'control-phone__formatted js-form-changes-skip ' ~ input_class_name,
    placeholder: placeholder,
    max_length: max_length
  } only %}

  {% set ajax_params = {} %}
    
  {% if ajax is defined %}
    {% set ajax_params = {
      ajax: ajax
    } %}
  {% endif %}

  {% include "interface/controls/suggest.twig" with {
    value: value,
    name: name,
    type: type,
    additional_data: additional_data,
    class_name: 'control-phone__suggest',
    input_class_name: input_class_name,
    input_type: 'hidden'
  }|merge(ajax_params) %}
</div>
Ссылка на вики репозиторий