Forum OpenACS Q&A: Re: checking multiple checkboxes... how? broekn? (Why am I doing this?)

So by the way, I hear some of you asking why I need to do this with template::element::set_value if the ad_form thingy works.

If I set the ad_form up as:

ad_form -name todo -form {
    {tasks:text(checkbox),optional {options [list $cboxes]} {label \"My favorites\"} {values [list $values])
} -new_data {

    ns_log notice tasks: [template::element::get_value todo tasks]
    
}
Then what comes out of template::element::get_value is not what the user checked on the form, but is in fact what I had stuck into the form in the initial definition. (At least, that's what I recall from a few hours back...)