Forum OpenACS Q&A: Response to ad_form select fields howto

Collapse
Posted by Don Baccus on
Try leaving out the validation block altogether - the built-in validation routine should be called automatically.  The validation block is meant for *additional* validation (i.e. insisting that an end date is greater than a start date, that sort of thing).

I'll try to improve the documentation on this a bit.  The inline documentation tends to assume you know how the form builder works, but as more and more people start using ad_form without having extensively used the templating system's form builder in the past this assumption's not going to hold.

In this case, it is the templating system's form builder, not ad_form, which calls the data type's validation function automatically.  If you haven't used the form builder before, there's no way you'd know that from just reading ad_form's docs ...