Forum OpenACS Q&A: Response to Checkbox Form t/f to database ...How?

Collapse
Posted by Johannes Haas on
I would use one radio - button for true and one for false, because its boolean. There is a procedure

[press_radio_widget update_newsletter_p f "Yes"] 
[press_radio_widget update_newsletter_p t "No"]

where update_newsletter_p is the variable name, t / f is the value.

If you want to use just one selectbox you could write on the -2.tcl page s.th like:

if { ![info exists $update_newsletter_p] } {set update_newsletter_p "f"}

the insert should be like values (...'$update_newsletter_p',..)