How can I customize a form collection prototype?

I don't want to use javascript to append "remove" buttons to each
collection item after DOM load.  Instead I want each collection item
to have "remove" and "add" buttons before hand and the prototype to
identically mimic this layout.

The add button is easy:

{% block collection_widget %}
{% spaceless %}
    <div class="collection">
        {% if prototype is defined %}
            {% set attr = attr|merge({'data-prototype':
form_row(prototype) }) %}
        {% endif %}
        {{ block('form_widget') }}
        <div class="add">
            <a href="#" title="Add">Add</a>
        </div>
    </div>
{% endspaceless %}
{% endblock collection_widget %}

But how do I add a remove item to each collection result and add it to
the prototype?

Regards,
Jordan Stout

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to