PHP Classes

File: templates/form/fields.html.twig

Recommend this page to a friend!
  Classes of Manolo Salsas  >  Symfony Create Bundle Skeleton  >  templates/form/fields.html.twig  >  Download  
File: templates/form/fields.html.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Symfony Create Bundle Skeleton
Application to create reusable Symfony Bundles
Author: By
Last change:
Date: 1 year ago
Size: 979 bytes
 

Contents

Class file image Download
{#
   Each field type is rendered by a template fragment, which is determined
   by the name of your form type class (DateTimePickerType -> date_time_picker)
   and the suffix "_widget". This can be controlled by overriding getBlockPrefix()
   in DateTimePickerType.

   See https://symfony.com/doc/current/form/create_custom_field_type.html#creating-the-form-type-template
#}

{% block date_time_picker_widget %}
    <div class="input-group date" data-toggle="datetimepicker">
        {{ block('datetime_widget') }}
        <span class="input-group-addon">
            <span class="fa fa-calendar" aria-hidden="true"></span>
        </span>
    </div>
{% endblock %}

{% block tags_input_widget %}
    <div class="input-group">
        {{ form_widget(form, {'attr': {'data-toggle': 'tagsinput', 'data-tags': tags|json_encode}}) }}
        <span class="input-group-addon">
            <span class="fa fa-tags" aria-hidden="true"></span>
        </span>
    </div>
{% endblock %}
For more information send a message to info at phpclasses dot org.