If you are using FORM, SQLFORM, or SQLFORM.factory, you can just pass the attribute to the instance.
form = SQLFORM(db.mytable, _autocomplete="off") form = SQLFORM.factory(Field(...), _autocomplete="off") form = FORM(INPUT(...), _autocomplete="off") web2py will always be backwards compatible. -Thadeus On Mon, Oct 19, 2009 at 2:18 PM, Fred <[email protected]> wrote: > > Given the security policy where I work I've been asked to try to > disable the web browser feature that saves login passwords. It looks > like setting the non-standard 'autocomplete' attribute to "off" for > the login FORM element can do that for many browsers. I'm trying to > figure out how to do that in web2py. > > My best attempt so far is to add the following to views/default/ > user.html just before the "{{=form}}" line: > > {{ form.attributes['_autocomplete'] = "off" }} > > Is that a valid way to do it? It seems to work the way I want for > Firefox at least but I'm concerned that it might not be forward- > compatible as web2py evolves. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

