Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Form, commandName and autocomplete="off"

I want to have the autocomplete="off" attribute on a form. I need it on the form because Firefox ignores it on the individual input elements.

The spring form tag does not support autocomplete and barfs if I try to add it.

If I don't use the spring form I am unable to set the commandName attribute.

Can anyone think of a way to get both autocomplete and commandName working together?

Cheers, Peter

like image 578
Programming Guy Avatar asked Jul 04 '26 08:07

Programming Guy


2 Answers

The spring form:input and form:password tags do support autocomplete. And they work just fine. Here is the Spring form tld reference.

like image 189
Sachin Sharma Avatar answered Jul 07 '26 02:07

Sachin Sharma


You have at least 3 choices:

  • extend the original form tag by your own implementation
  • use the bind tag instead of the form tag, then you can write the html form tag like you wast: see http://jroller.com/habuma/entry/spring_form_tags
  • add the attribute by java script. for example the dojo framework willl help you
like image 37
Ralph Avatar answered Jul 07 '26 02:07

Ralph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!