title: Display a field depending on a checkbox
body: <p>I have a form with a checkbox field and I want basically when this checkbox is checked, display a field below.</p>
  
  <p>I do not know what is the best practice in symfony to do that...</p>
  
  <p>Form builder : </p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options)
  {
          -&gt;add('protected', 'checkbox', array(
              'label' =&gt; 'Protected by a password ?',
              'required' =&gt; false,
              'mapped' =&gt; false
          ))
          -&gt;add('password', 'password', array(
              'label' =&gt; 'Mot de passe',
              'required' =&gt; false
          ))
  }
  </code></pre>
  
  <p>So if the field 'protected' is checked, I want to display 'password' field.</p>