Forum OpenACS Q&A: Re: ad_form and multiple

Collapse
3: Re: ad_form and multiple (response to 1)
Posted by Don Baccus on
You need to tell it that it is multiple ... try

text(multiselect),multiple

Sorry about that but the form builder treats multiples as being different than other stuff and as ad_form is just wrapping the form builder with a (hopefully) more user-friendly API ...

ad_form is still a bit of an experiment...and the form builder incomplete.  Ideally ad_form (and the form builder) whould know that a "multiselect" datatype might return (will often return) mulitiple values.  But that's not the case, yet.  The form builder expects the programmer to tell it if this is true (silly since "multiselect" implies it) and ad_form blindly exports that API to you.

Obviously the whole form builder concept of a datatype needs to be extended so that our core code does what one expects, so that the form builder and ad_form follow the law of "least astonishment" when they take action.

I'm not quite sure when we'll get there.  Other core issues have seemed more relevant to me (non-scalability of permissions for instance.)  Others have picked up the slack in other areas, Peter in the APM (great work), Joel in documentation (ditto), Jeff in patch and release work (and Janine, too) and dozens of others in various subrealms of the project.

But we're getting to the point where "rapid development" is going to be a key concept, and cleaning up the form builder (and by inference ad_form) is going to be a top, top priority ...