{hallmarks:text(multiselect) {label "Hallmarks"}
{values "$hallmarks"}
{options {{Scholarship 1} {Leadership 2} {Fellowship 3} {Service 4}} }
{html {size 4}}
}
That gives me a form for editing with the four choices able to be selected. (I also needed to set it as {hallmarks:multiple ""} in ad_page_contract.)
Hitting the submit button gets the multiply selected values of hallmarks through ad_page_contract, but then something seems to go amiss in ad_form. A ns_log entry down in the -new_data area (or -edit_data) shows that only the first selection appears in $hallmarks. Any additional selections are somehow lost.
I also tried replacing the {values "$hallmarks"} in the code snippet above with {values "1 2 3"}, with the same result: only the first value seems to make it into -new_data or -edit_data.
I grepped through the existing packages looking for some example code using ad_form with multiple selection, but I haven't found any.
Sorry for going on and on. I'm hoping that documenting my confusion will be useful to the folks working on ad_form documentation. If anyone has a working (even if ugly) example of using ad_form with multiselect, it would really help me to see one. Thanks in advance. :)
--Cathy
Request notifications