CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Adding autocomplete="off"

Questions & Answers about IWCGJQuery Suite.

by MCarver » 01 Oct 2014 23:01

CG Gurus:

I have a need to add autocomplete="off" to any TIWCGJQEdit controls. My first thought was to simply use the OnHtmlTag event. But this action adds the property to the outer <div>.. and not the inner <INPUT>

So.. how does one add attributes like the one in question to the <INPUT> tag? Ultimately, I am looking for a solution like the following example:

<input type="TEXT" name="IWEDTLOGINIDINNER" autocomplete="off" maxlength="40" value="mcarver" style="text-align: left;padding:0;width:100%;height:100%;" class="ui-widget ui-widget-content ui-corner-all cc-item-field" id="IWEDTLOGINIDINNER" placeholder="enter username">

Please advise.
Monte Carver
MCarver
 
Posts: 48
Joined: 27 Sep 2013 19:15

by MCarver » 01 Oct 2014 23:52

PROBLEM SOLVED
I did not realize that InnerEdit contained an OnHTMLTag event.

So I simply did
for i := 0 to self.ComponentCount - 1 do
begin
if self.Components[i] is TIWCGJQEdit then
(self.Components[i] as TIWCGJQEdit).InnerEdit.OnHTMLTag := fxSetAutoCompleteOnHtmlTag;

AND
procedure TzpgBase.fxSetAutoCompleteOnHtmlTag(ASender: TObject; ATag: TIWHTMLTag);
begin
aTag.AddStringParam('autocomplete', 'off');
end;


MCarver wrote:CG Gurus:

I have a need to add autocomplete="off" to any TIWCGJQEdit controls. My first thought was to simply use the OnHtmlTag event. But this action adds the property to the outer <div>.. and not the inner <INPUT>

So.. how does one add attributes like the one in question to the <INPUT> tag? Ultimately, I am looking for a solution like the following example:

<input type="TEXT" name="IWEDTLOGINIDINNER" autocomplete="off" maxlength="40" value="mcarver" style="text-align: left;padding:0;width:100%;height:100%;" class="ui-widget ui-widget-content ui-corner-all cc-item-field" id="IWEDTLOGINIDINNER" placeholder="enter username">

Please advise.
Monte Carver
MCarver
 
Posts: 48
Joined: 27 Sep 2013 19:15

by Jorge Sousa » 02 Oct 2014 09:39

Hello MCarver

I'm glad you find it by your own.

This is a very pertinent subject, we are going to add a new property to do the same automatically.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 02 Oct 2014 11:31

Hi again

2.3.0.58

JQEdit:
- Added: new property Autocomplete: Boolean, to add the html input attribute autocomplete.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to Q & A

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.