I'm inserting a page that will allow the person sending the bulk mail to optionally choose which group members they want it to go to. So where the flow used to go spam (create form) -> spam (validate form and load spam-2) -> spam (send message), it now goes spam-recipients (build list of user ids) -> spam (create form) -> etc.
I have no problem passing my list of user ids from spam-recipient to spam, but it's not surviving the round trip through the form. The entry in ad_page_contract in spam.tcl looks like this:
when the form is created in spam.tcl it contains this:
element create spam_message recipients \
-label Recipients \
-datatype integer \
-widget hidden \
Which looks like this:
<input type="hidden" name="recipients" value="475 287" />
in the browser.
The problem is that when I come back into spam.tcl, this no longer looks like a list of integers and it gets rejected by ad_page_contract with
"recipients is not an integer"
I consulted the documentation, which seemed to imply that I should be using -values instead of -value in my form element. I tried various variations on that:
-values [list $recipients]
-values [split $recipients]
But in all cases I ended up with
<input type="hidden" name="recipients" />
Not exactly what was wanted.
Suggestions? Thanks in advance!