Bug #27415
closedViewHelper Forms with method get and action parameter do not address to right action
0%
Description
A form like the following is rendered invalid:
<f:form action="list" method="get" id="searchForm" name="searchForm">...</f:form>
The reason is, it is addressing the action as a query string in the form action attribute. This query string gets completely substituted by the form fields inside the form.
Resolution: On get formulars, render the query string as hidden form fields.
Manual workaround:
<f:form action="list" method="get" id="searchForm" name="searchForm">
<f:form.hidden name="action" value="list" />
...
</f:form>
Updated by Stefan Neufeind about 13 years ago
- Status changed from New to Accepted
Updated by Stefan Neufeind about 13 years ago
At least it would be up to the browser to merge the two (get-arguments from action-URL and from the form). I agree this doesn't seem right. And checking with at least Firefox 4 those arguments are lost as you describe.
Same holds true for fluid in FLOW3.
Updated by Bastian Waidelich about 13 years ago
The way we should probably implement this, would be to create the action URI as before, parse it with parse_url() and retrieve the query parameters with parse_str() And then we could create the hidden fields from them. This should happen for GET only and it should be possible to deactivate it IMO.
Updated by Anja Leichsenring over 11 years ago
- Project changed from 534 to 2559
- Category changed from 963 to Fluid: ViewHelpers
Updated by Wouter Wolters over 11 years ago
TYPO3 Fluid has an implementation for this AFAICS
Updated by Clément MICHELET almost 11 years ago
Seems to be fixed in Flow3 in issue #11636
Any hope to have backport for 6.2 ?
- a table with results
- a filter form for table
- a paginate widget
Pass hidden value didn't work with 6.1.5.
Set the form method to post imply to persist form values which is an alternative solution but imply also many new checks to handle.
Updated by Marc Bastian Heinrichs almost 11 years ago
- Target version set to Fluid 6.2
We could not backport this 1:1 because we have to have realurl in mind.
Updated by Alexander Opitz almost 10 years ago
- Project changed from 2559 to TYPO3 Core
- Category changed from Fluid: ViewHelpers to Fluid
- Target version changed from Fluid 6.2 to 7.0
- TYPO3 Version set to 6.2
- Is Regression set to No
Updated by Mathias Schreiber over 9 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Benni Mack about 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog about 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Claus Due almost 9 years ago
I suggest closing this one. It is known that creating colliding field names causes the last used field name to override others. That's very much by design, would also happen in a regular form where you set "action" with arguments you also set in form - and all the suggested acrobatics about parsing the current request seems to be much overkill. It's not really a "bug", it's more of a feature - that you're actually able to for example set a dynamic controller name, template format etc. by creating input fields named for these reserved API-level URL parameters.
Updated by Claus Due almost 8 years ago
- Status changed from Accepted to Closed
Closing, partly due to lack of interest (no activity in three years) and partly due to this being by design. If you disagree with the decision feel free to request reopening or open a new issue referring to this one.