Tuesday, May 1, 2012

Getting checkbox value in controller

I have a template that creates a text entry field and a checkbox. When
the checkbox is unchecked, the text field is disabled and cleared,
when it's checked, it's enabled, and the user may or may not have
typed in it. In my controller I need to distinguish between the 2
cases when the checkbox is unchecked, and then the checkbox is checked
but the text field is blank. I can get the value of the text field,
but not of the checkbox. Is there some way to do this? I've googled
this, and this has been asked a few times on stackoverflow, but none
of the solutions seem to work for me.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment