Forum OpenACS Q&A: Re: Thanks all!

12: Re: Thanks all! (response to 11)
Posted by James Bennin on
I have read your post and I am dealing with similar issues.  I have a adp that use the form tag.  When the submit button is clicked, I want all the options that user selects (from a list of checkboxes) to be stored in a database table (using "insert into......")  How did you do that?  Could you step me through or send me a sample of you tcl code?

Thank you

13: Re: Thanks all! (response to 12)
Posted by Jade Rubick on
In the first page:

Then you have the checkboxes be the same name as each other, but different values.

In the second page:

Specify that the variable is a multiple in the ad_page_contract.

Then foreach var multiple_variable_name {
  db_dml statement_name "insert into foo ..."