Re: Setting checkbox to check as default value
Hi Jeff, On 12/2/06, jeffhg58 <[EMAIL PROTECTED]> wrote: > I have a custom manipulator and I am trying to set the checkbox default > to checked. > > For example, my field name is: > > forms.CheckboxField(field_name="current"), Pass a 'checked_by_default' argument to the CheckboxField constructor, like this: forms.CheckboxField(field_name="current", checked_by_default=True), Regards, Jorge --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Setting checkbox to check as default value
I have a custom manipulator and I am trying to set the checkbox default to checked. For example, my field name is: forms.CheckboxField(field_name="current"), Not sure how you to do it. I tried putting the attribute after the field name which did not work. I also tried right before the formwrapper call as such # No POST, so we want a brand new form without any data or errors. errors = {} new_data['current'] = "checked='checked'" Thanks, Jeff --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---