Click to See Complete Forum and Search --> : Form Validation with little icons?
Somewhere I've used a site that upon completing a field/onblur, a little graphic/icon at the end of the field has changed to either a green tick or a red cross depending on whether the contents pass validation or not.
In addition, the Submit button won't submit unless all conditions are 'green'.
Anyone seen anything like this as I would like to recreate it within a form I'm now developing!
Cheers, @sh
NogDog
07-26-2008, 01:44 PM
That would be a JavaScript issue, not PHP (other than perhaps to populate the data used by the Javascript functions).
That would be a JavaScript issue, not PHP (other than perhaps to populate the data used by the Javascript functions).
Yeah, I know that!!! Thats why I've posted in the Coding section, incase anyone is aware of such a Javascript/Ajax script.
(Moving to Client-Side forum, then. -- NogDog)
NogDog
07-26-2008, 05:14 PM
I can't point you to any ready-made scripts. If I were doing it, I'd probably use a background image for the "light" (probably in the associated <label> element), then for each field have an onchange or onblur event that calls a validation function. If the function would then change the background image depending on its validation result.
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.