New / Edit form configuration

    Display

    Of course the basic display will not be so diferent of list. But you'll probably want to do more !

    Basic usage

    new:
      display: [ title, name ]
    

    With fieldsets

    edit:
      display: 
        NONE: [ title, name ]
        "Where is it ?": [ location ]
    

    Tip
    Like in symfony 1, the none key allow you to set a fieldset without legend else the key is the legend

    And the killer feature is : Show more than one field per rows

    edit:
      display: 
        NONE: [ title, name ]
        "Where is it ?": [ location_id, [ zipcode, country ]]
    

    Note: You have to be under a fieldset. that's means you can't use multiple fields per rows with the basic display :

    new:
      display: [ title, [ name, firstname ] ]
    
    new:
      display: 
        NONE: [ title, [ name, firstname ] ]
    

    Overwrite the rendering of a field

    Edit the file : YourBundle/Resources/views/(Edit|New)/index.html

    And for the column title overwrite the Twig Block named form_title

    {% extends_admingenerated "NamespaceYourBundle:(Edit|New):index.html.twig" %}
    {% block form_title %}
        {{  parent() }}
        <div id="preview_title">
        
        </div>
        <script>
            // Do here your own
        </script>
    {% endblock %}
    

    Found a typo ? Something is wrong in this documentation ? Just fork and edit it !