Answer the question
In order to leave comments, you need to log in
How to customize the time type in a form?
Can you tell me how to customize the time type in a Symfony form?
Twig:
{{ form_label(form.sending_value, 'Во сколько', {'label_attr': {'class': 'uk-form-label'}}) }}
{{ form_widget(form.sending_value, {'attr': {'class': ''}}) }}
->add('sending_value')
<div id="section_sending_value" class="">
<select id="section_sending_value_hour" name="section[sending_value][hour]">
...
</select>
:
<select id="section_sending_value_minute" name="section[sending_value][minute]">
...
</select>
</div>
Answer the question
In order to leave comments, you need to log in
Declare that you will use your theme in the given twig
{# имппортирует "_self" в качестве темы формы #}
{% form_theme form _self %}
{# настроить фрагмент формы #}
{% block form_row %}
{# вывод строки пользователького поля #}
{% endblock form_row %}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question