{% extends "MopaBootstrapSandboxBundle::layout.html.twig" %} {% from 'MopaBootstrapBundle::flash.html.twig' import session_flash %} {% block headline %}Extended forms Example{% endblock headline %} {% block content %}
{{ form_widget(form) }}

Everything's included

All things shown here are directly included via the bundle.

You can completely drive the appearence within the form classes, and hopefully updates wont change the view!

An example: to generate nice inputs with icons you dont write one line of html:

$builder
    ->add('Appended Icon', 'text', array(
        'widget_addon' => array(
            'icon'   => 'pencil',
            'append' => true
        ),
        'attr' => array(
            'class'       => 'span1',
            'placeholder' => 'span1'
        )
    ))
;
    

And in your markup you just need one line:

{% raw %}
      <form class="form-horizontal">
        {{ form_widget(form) }}
      </form>
{% endraw %}
    

Absolutely responsive!

Resize your browser to see responsiveness in action, if you make your browser small enough (e.g. as small as a smartphone display) you will see all forms still work and look really good!

{% endblock content %} {% set showTemplate = _self %}{% set showForm = formType %}