PHP Classes

File: templates/admin/blog/_form.html.twig

Recommend this page to a friend!
  Classes of Manolo Salsas  >  Symfony Create Bundle Skeleton  >  templates/admin/blog/_form.html.twig  >  Download  
File: templates/admin/blog/_form.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: 2 years ago
Size: 1,006 bytes


Class file image Download
    By default, forms enable client-side validation. This means that you can't
    test the server-side validation errors from the browser. To temporarily
    disable this validation, add the 'novalidate' attribute:

    {{ form_start(form, {attr: {novalidate: 'novalidate'}}) }}

{% if show_confirmation|default(false) %}
    {% set attr = {'data-confirmation': 'true'} %}
    {{ include('blog/_delete_post_confirmation.html.twig') }}
{% endif %}

{{ form_start(form, {attr: attr|default({})}) }}
    {{ form_widget(form) }}

    <button type="submit" class="{{ button_css|default("btn btn-primary") }}">
        <i class="fa fa-save" aria-hidden="true"></i> {{ button_label|default('label.create_post'|trans) }}

    {% if include_back_to_home_link|default(false) %}
        <a href="{{ path('admin_post_index') }}" class="btn btn-link">
            <i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'action.back_to_list'|trans }}
    {% endif %}
{{ form_end(form) }}
For more information send a message to info at phpclasses dot org.