| | 138 | |
| | 139 | == I'm using formfields.FormWrapper and none of my form fields show up == |
| | 140 | |
| | 141 | ==== Problem ==== |
| | 142 | |
| | 143 | You are using code similar to that documented [http://www.djangoproject.com/documentation/forms/ here], but when you put {{ form.field_name }}, you get nothing. |
| | 144 | |
| | 145 | ==== Solution ==== |
| | 146 | |
| | 147 | Make sure when you create your form object, you are passing in empty '''dictionaries''', not tuples. For example: |
| | 148 | {{{ |
| | 149 | manip = things.AddManipulator() |
| | 150 | form = formfields.FormWrapper(manip, {}, {}) |
| | 151 | }}} |
| | 152 | |
| | 153 | Not: |
| | 154 | |
| | 155 | {{{ |
| | 156 | manip = things.AddManipulator() |
| | 157 | form = formfields.FormWrapper(manip, (), ()) |
| | 158 | }}} |
| | 159 | If you pass in empty tuples for data & errors, it will silently fail to insert your form fields. |