Forum OpenACS Q&A: Re: Creating checkboxes with db_multirow

Collapse
Posted by Jon Griffin on
You really should use ad_form, http://jongriffin.com/static/openacs/ad_form/using-ad-form, will tell you how.
Collapse
Posted by Tilmann Singer on
If you need to create the multirow also for something else then you might put together a list in its code block and use that later for setting the options list:

set options [list]
db_multirow subscriptions subscriptions { *SQL* } {
  lappend options [list $caption $value]
}

element create delete_subscription subscription_id \
  -label "" -datatype text -widget checkbox        \
  -options $options

Jon - I don't see any advantage of using ad_form over the old way in this particular case except the general reasons for ad_form - did you mean those or is this problem easier to solve with ad_form, if yes how?