Forum OpenACS Development: Need help with required fields on a form

OpenACS ad_form assumes every field on the form as required if i am not wrong. Is there a way to modify the default "required fields" property? I mean i don't want to see any errors saying "field is required" even if some fields of my choice are empty when the form is submitted. How can I do that?

Thanks.

Collapse
Posted by Victor Guerra on
You can define the elements as optional doing it like this:

{names:text(text),optional { value "my name" }}

note the ",optional".

Collapse
Posted by Michael Cordova on
Easy question, but... how is it possible for Victor to reply on 06/12/08 05:59 PM, 8 hours before Kung Fu Panda original message? 😉
Collapse
Posted by Emmanuelle Raffenne on
Miguel,

AFAIK, this is a bug that has been fixed in a later version than the one openacs.org is running.

Collapse
Posted by Ryan Gallimore on
A very good ad_form reference can be found here:

http://home.galileo.edu/~miel/openACS/pdf/ad-form-quick-ref.pdf

It details the proc, with examples.