jeffhg58 wrote: > I am trying to set the checkboxfield default value to checked but not > sure how you do it. > > Here is my formfield for the checkbox > > forms.CheckboxField(field_name="current"), > > I tried ading checked="checked" but that did not work.
It's a bit non-obvious... The actual data to display is provided by a method called `flatten_data` that is then used to create a form like this: data = manipulator.flatten_data() form = FormWrapper(manipulator, data, errors) (This is how generic views work and how custom views should be written). So you have to provide this method in your manipulator returning a dict with prefilled values: def flatten_data(self): return { 'current': True, } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---