Forum OpenACS Development: Re: get category values within the form

Collapse
Posted by Malte Sussdorff on
Hi Iuri,

the proper process to achieve this is using Javascript. The logic is that you have a second container (the second drop down), which is not filled with any values (it is empty). Maybe you don't even show it (you can hide it).

But to solve your problem, why don't you say and put this at the top of your page?

for {set i 0} {$i < [ns_set size $myform]} {incr i} {
set varname [ns_set key $myform $i]
set $varname [ns_set value $myform $i]
}
}

set child_id [set cat_${category_id}]

Collapse
Posted by Gustaf Neumann on
Be warned that blindly overwriting vars is never a good idea. You will shoot in your own foot, when your form contains e.g. a varname "i" ...