I've been pounding my head against the monitor on this one...I'm getting tired and it's late.... Thanks in advance!
In /register/user-new.tcl I modified the Form and added a new opt in checkbox for a newsletter. I altered the users table to add a new field called update_newsletter_p char(1). In the tcl file I have:
... (form method=post action="user-new-2.tcl") ... #### My New Checkbox addition (input type=checkbox name=update_newsletter_p value="f") ... (input type=submit value="Register") ...
In /register/user-new2.tcl I add the new field to to the insert statement:
set insert_statement "insert into users (user_id,...update_newsletter_p...) values ($user_id,... $update_newsletter_p, ...)"
I get two types of error messages:
If I DO NOT check the box:
Error: nsd.tcl: can't read "update_newsletter_p": no such
variable
If I check the box (for 't')
Error: Ns_PgExec: result status: 7 message: ERROR: Attribute 't'
not found
I read that "When a form is submitted, only the "on" checkboxes submit values to the server."
Soooo, How do I stuff a 't' or 'f' into the database from checkboxes on a form ?
-Bob
Request notifications