New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
form_rest() renders fields that have already been rendered with form_widget() #1051
Comments
Must be linked to this commit, sorry about that. This definitely need to be fixed and more tests should be added. |
This isn't fixed and is still happening in master. Bundle here replicating the issue. |
@johnwards can you test my "fix" ? For me it's working properly with it. |
I can verify stloyd's "fix" worked against my installation. It is a per-item fix though so if you were to only use form_widget and form_errors when form_rest is called the label will be rendered by itself. I cant really comment on if that part is valid or not. |
@stloyd your fix is probably a step in the right direction. We should be able to achieve the same result by using the But may be we should start by adding some unit tests. Once we have some those tests available we should fix both the twig extension and the php helper. |
@vicb I already moved it to |
…using `form_row`/`form_widget`) fields (symfony#1051)
@vicb / @ebernhardson Can you just test my "fix" (#1186) ? |
I've also suggested a fix in the #1115 comment thread. |
fixed here: #1221 |
Form fields rendered individually with form_widget(...) or form_row(...) are re-rendered via form_rest(...)
This issue is related to beta2 and was not present in beta1.
Example:
{{ form_widget(phone_number_form.phone_type) }} {{ form_widget(phone_number_form.phone_number, { 'attr': { 'style': 'width:120px;' } }) }} ext. {{ form_widget(phone_number_form.extension, { 'attr': { 'style': 'width:40px;' } }) }}
When I call form_rest(...) at the end of the form, all of the above fields are rendered again.
The text was updated successfully, but these errors were encountered: