Forum OpenACS Development: Re: can't read "msg_keys": variable is array

Collapse
Posted by Dave Bauer on
Hi,

I suspect you are making this more complicated than it needs to be.

Can you step back and explain what you are trying to accomplish? I think there is something more I need to know to give you advice on the best solution.

I don't think passing a multirow through multiple page requests is a good idea and there probably is a much simpler solution.

In general it is best to use the database to persist values between requests. That is a core feature of openacs.

Collapse
Posted by Iuri Sampaio on
Thanks Dave.

The answer is here

set myform [ns_getform]
if {[string equal "" $myform]} {
ns_log Notice "No Form was submited"
} else {
ns_log Notice "FORM"
# ns_set print $myform

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

ns_log Notice " $varname - $varvalue"
}
}

The form has been passed properly through the pages. The issue was just how to get the values.

I wasn't making anything complicated i was just using the existing page and code without touching too much on its structure