Forum OpenACS Q&A: template::element::get_values returns only a single value

Hi

I'm calling template::element::get_values passing a form that has 3 checkbox widgets with multiple values selected for each of the 3 widgets. But I get only a single value back for each checkbox widget when I call template::element::get_values. I am expecting to get back a list containing the multiple values the user selected in my form.

Here's how I create my checkbox widgets

template::element::create edit_ad bodytype \
         -label "Body Type" -datatype text -widget checkbox \
         -options { {Slim slim} {Average average} {Muscular muscular} {{A few extra pounds} pounds} {Athletic athletic} \
                    {Fit fit} {Tone tone} {Heavy heavy} {Swimmer swimmer} {Stocky stocky} {Curvy curvy} {Petite petite} }

I don't set any of them programmatically, they are clicked on in the form and submitted in the good old fashioned way!

Here's how I call template::element::get_values for each checkbox widget

 if {[template::element::exists $form_id $attribute_name]} {
    set values_list [template::element::get_values $form_id $attribute_name]
    set output "$output 
$values_list" foreach one_value $values_list { set output "$output
$attribute_name $one_value" } }

What am I doing wrong? Where are my multiple selections going? I need them!