KEMBAR78
Allow rendering forms multiple times · Issue #62101 · symfony/symfony · GitHub
Skip to content

Allow rendering forms multiple times #62101

@speller

Description

@speller

Description

I'm rendering a paginator form like this:

<form method="get" action="/search">

    <div class="form-widget-compound">
        <div>            
            <div class="">
                <div class="form-group"><label class="form-control-label required" for="page_size">Rows</label>
                <div class="form-widget">

                    <select id="page_size" name="page_size" class="form-select">
                    <option value="20" selected="selected">20</option>
                    <option value="40">40</option>
                    <option value="60">60</option>
                    </select>

                </div>
            </div>
        </div>
    </div>
</div>

<input type="hidden" name="filters[countryId][value]" value="JP">
<input type="hidden" name="filters[countryId][comparison]" value="=">
<input type="hidden" name="filters[steering][value]" value="left">
<input type="hidden" name="filters[steering][comparison]" value="=">
<input type="hidden" name="page" value="1">
<input type="hidden" name="search" value="">
                                                                    
</form>

All previous discussions I saw mentioned CSRF and unique IDs as the reason why multiple rendering is not allowed, for example, here: #26531. But since the form above has no CSRF or unique IDs, these reasons are not (fully) valid. Could you allow explicit duplicate form rendering? By default, they can behave as now. But with a custom flag, I would like to be able to render a form again.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions