[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - DHTML Form Validation - onPaste event not Triggered by...
Advertisement

DHTML Form Validation - onPaste event not Triggered by...

Moderators: Calcifer, slothy

DHTML Form Validation - onPaste event not Triggered by...

Postby gecko68 » Sat Aug 19, 2006 12:57 am

gecko68
 
Posts: 2
Joined: Sat Aug 19, 2006 12:55 am

Work around...

Postby gecko68 » Sat Aug 19, 2006 1:47 pm

Here is a work around for the problem with Firefox/Google AutoFill

Prior to submitting (in the onsubmit) I call the following function.
It loops through the form and validates each field one last time.

Please note : In my code, I do not validate hidden, radio , or image types.

function dblcheckFormValidation()
{
var inputFields = document.getElementsByTagName('INPUT');

var inputs = new Array();
for(var no=0;no<inputFields.length;no++){
inputs[inputs.length] = inputFields[no];
}
for(var no=0;no<inputs.length;no++){
if (inputs[no].getAttribute('type') != 'radio' && inputs[no].getAttribute('type') != 'image' && inputs[no].getAttribute('type') != 'hidden') {
validateInput(null,inputs[no])
}
}

}
gecko68
 
Posts: 2
Joined: Sat Aug 19, 2006 12:55 am

any updates on the autofill problem yet?

Postby obiwon » Sat May 24, 2008 4:58 am

This approach to form validation is cool.

I have it in operation on a site.

Folks are really not cool with their autofill not working.

Basically, without an autofill workaround this approach is not going to be production worthy.

I would like to stress that the validation needs to show fields autofilled as validated as soon as the form loads, or within microseconds of page load.

Possible?
obiwon
 
Posts: 10
Joined: Tue Aug 22, 2006 2:59 am

setInterval Bandaid approach

Postby obiwon » Mon May 26, 2008 8:25 am

obiwon
 
Posts: 10
Joined: Tue Aug 22, 2006 2:59 am


Return to Form widget questions

Who is online

Users browsing this forum: No registered users and 3 guests