Forum OpenACS Q&A: Response to Validating form elements with the form builder

Collapse
Posted by Jeff Davis on
The problem is that if you use ad_page_contract as it stands it is convenient for developers and maybe easier to maintain but then you get error pages like:
We had a problem processing your entry:

* Value for subject contains HTML tags
* bug Id must be an integer

Please back up using your browser, correct it, and resubmit your entry.

Thank you.
which is infinitely worse from a user standpoint that inline error messages like you get with the form builder code.

You can say the form builder code is bad but I am pretty sure it (or something roughly as complex) is necessary for building a usable web interface. Form builder has failings and we should address them (the one Dave ran into and the duplication of filtering/validation procs between ad_page_contract and the form stuff being a couple I am aware of). Any replacement would like have roughly equivalent shortcomings over the medium term.

It is also a misconception that form builder replaces ad_page_contract. ad_page_contract also serves to document pages which have no associated forms and ensure that inputs adhere to strict rules. It has it's place even on pages with forms.