Validation responses in form

A place for users and developers of the Xataface to discuss and receive support.

Postby ds_barf » Fri Aug 03, 2007 10:11 am

Hi there,

first of all: I can't believe Dataface is a free piece of software! :D This is absolutely great! I never quite understood MySQL but thanks to DF I'm actually making a customer application for my boss :P

But I've got a question. I'm editing the fields.ini file in one of my tables, and for some reason there is a different notification for some of the fields. For example, when the user inputs a letter in the telephone field, I get a standard windows pop-up-error-box (you know what I mean :P) But when you enter a wrong email adres, there's this nice coloured highlight around the input field with the error-message. I would like for all validations to be handeled like this, is that possible?

Thanks!

Regards,

Sebastiaan
ds_barf
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Aug 03, 2007 12:33 pm

Ok.. this is likely due to the fact that some validation can be done using Javascript without having to submit to the server.Ê If you add your own custom validation in one of your delegate classes, however this won't be handled with javascript, but will be handled with PHP returning an "error" form with red around the problematic field.
HTML_QuickForm does have a flag to disable javascript validation, but I don't recommend it.Ê Javascript validation can save users a lot of time.Ê (For this reason, I didn't tie this flag into any dataface config files - so you would have to change the source code yourself to turn this off).
For completeness and to avoid confusion, it is important to note that if the user has javascript turned off, for some reason, all fields are validated with PHP anyways, so there is "redundant" validation in cases where javascript validation is in effect.
Best regards
Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ds_barf » Sat Aug 04, 2007 12:14 am

Hi Steve,

Ok thanks, I'll look deeper into the delegate classes :)

Regards,

Sebastiaan
ds_barf
 
Posts: 2
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 37 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved