dhamaso / ufd

Automatically exported from code.google.com/p/ufd
GNU General Public License v2.0
0 stars 0 forks source link

UFD contaminates form get/post with ufd- values #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. apply UFD to a select component in a form that submits with GET, comes back 
to same page
2. pick something in the list
3. submit the form

What is the expected output? What do you see instead?
The value on the query string should be value attribute from the selected 
option.  
However, in addition the contents of the UFD text box also appears in the query 
string.
This means that on a POST that string is also cluttering the posted 
information.  This would appear to contradict the 'unobtrusive' part.

What version of the product are you using? On what operating system?
UFD 0.6, Windows XP/FF 5 beta.

Please provide any additional information below.

Original issue reported on code.google.com by aru...@anm.org on 14 Jun 2011 at 12:18

GoogleCodeExporter commented 9 years ago
True, but I am not sure how I could achieve that in code; suggestions welcome!  

Original comment by thetoolman on 22 Jun 2011 at 10:49

GoogleCodeExporter commented 9 years ago
I guess you'd have to yank the UFD components out of the form before the form 
is submitted.  Can you bind to the onsubmit event of the form and yank the UFD 
components before it submits?  If I get a chance, I'll give that a shot.

Original comment by aru...@anm.org on 23 Jun 2011 at 8:53

GoogleCodeExporter commented 9 years ago
Yes that would work, but only for regular form posts, not for AJAX serialize 
etc.  Plus it would look bad when the textbox is removed. 

I respect your unobtrusive eye, but does the extra text field actually cause a 
problem for you? 

Original comment by thetoolman on 23 Jun 2011 at 8:58

GoogleCodeExporter commented 9 years ago
By default, the Symfony 1.4 form framework throws validation errors if extra 
fields are present in the posted values.  You can work around this, but only by 
disabling the security check.

Original comment by GABi...@gmail.com on 7 Dec 2012 at 4:24