Skip to content

Issue 13852 - Added omit_action option to form type #15995

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

Closed
wants to merge 2 commits into from
Closed

Issue 13852 - Added omit_action option to form type #15995

wants to merge 2 commits into from

Conversation

jaytaph
Copy link
Contributor

@jaytaph jaytaph commented Sep 29, 2015

Q A
Bug fix? [no]
New feature? [yes]
BC breaks? [no]
Deprecations? [no]
Tests pass? [yes]
Fixed tickets [13852]
License MIT
Doc PR

This patch simply adds an omit_action option to formType, which allows users to omit the action attribute from a rendered <form> element. According to the original issue #13852 this serves two purposes: 1. HTML5 forms who don't want to explicitly add an action will be valid (an empty action is not allowed in HTML5, and 2. Ajax forms and AngularJS will function without overriding the form_start template.

@1ed
Copy link
Contributor

1ed commented Sep 29, 2015

Do we need a new option for this? Why not check for action=false like it's done for the label option already?

@ogizanagi
Copy link
Contributor

I agree with @1ed , a new option is not required for this.

@Tobion
Copy link
Contributor

Tobion commented Sep 29, 2015

👎 Dislike a new option for a workaround. See #13852 (comment) for my proposal.

@xabbuh
Copy link
Member

xabbuh commented Sep 29, 2015

I agree. Not rendering the attribute when it is empty sounds more sensible to me.

@fabpot
Copy link
Member

fabpot commented Sep 30, 2015

Closing in favor of #16029

@fabpot fabpot closed this Sep 30, 2015
fabpot added a commit that referenced this pull request Sep 30, 2015
… action attributes (xabbuh)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][TwigBridge] do not render empty form action attributes

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13852, #15995
| License       | MIT
| Doc PR        |

Commits
-------

1307043 do not render empty form action attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants