Page 1 of 1

PostPosted: Fri Aug 03, 2007 10:11 am
by ds_barf
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

PostPosted: Fri Aug 03, 2007 12:33 pm
by shannah
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

PostPosted: Sat Aug 04, 2007 12:14 am
by ds_barf
Hi Steve,

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

Regards,

Sebastiaan