Autocomplete in input fields

Autocomplete in input fields

  
Anybody know how to do this : <INPUT TYPE="password" AUTOCOMPLETE="off">

It is not a CSS element so no style can be addressed...

This has nothing to do with AJAX-autocomplete, just plain HTML
Hi Joop!

Well... umm... the simplest way to do it would be an unescaped expression, but I guess that is not useful for you afterwards.

A suggestion I would give would be for you to do some javascript code that would get the input by its ID (or class, there are some javascript frameworks that already do that). I think that you can use getElementById , since it's included in jQuery, which we probably already use in RichWidgets (or maybe even by default).

After that, you can either change the element's outerHTML (not sure if it will work, but it looks the simpler way), or add an attribute to it, in runtime, using javascript.

See this:
http://bytes.com/topic/javascript/answers/148295-setting-outerhtml-can-done

and this: http://www.dustindiaz.com/add-and-remove-html-elements-dynamically-with-javascript/

Depending on your previous experience with javascript, it might seem daunting, but it's not really difficult.

I recommend you use Firefox and Firebug (the extension), because it has a fantastic Script debugging panel.

Hope it helps :)

Cheers,

Paulo Tavares

Hi Joop,

You can also add an extended property named autocomplete with value "off" to an input password widget:



Cheers,
Tiago Simões
Sorry for scaring you, Joop.

...my answer is what happens when you don't develop in OutSystems for a long time :)

Thanks a million Tiago. You are absolutely right.

[Paulo is off to slap himself]

Tiago,

Can this be used in every kind onf field ?
Not only password type ...

 

Hi Joop,

Yes, it can be used in every kind of field.
Works like a charm :-)
Thanks
Hi,

This solution works in Service studio 4.2?

Thanks.
Hi Maria,

Yes, it should work in 4.2 also.

Cheers,
Tiago Simões
I guess the autocomplete parameter is interpreted directly by the browser and therefore Outsystems platform independent:
http://msdn.microsoft.com/en-us/library/ms533486(VS.85).aspx

@ Tiago
Is the Extended Properties part interpreted in any way by the Outsystems Platform or is
this the way it is meant to add extra 'hidden' parameters in a structured manner?
Hi Eric,

The expressions in the value are evaluated but the result is dumped in the html in any attribute name you specify (for flexibility reasons no validation is made if the attribute name is valid, if that's what you were asking).

Cheers,
Tiago
Hi Tiago,

That's what I wanted to know.
Thanks again!

Cheers,

Eric