FormWizard should not output raw HTML for previous_fields
|Reported by:||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
When using a
FormWizard to generate forms it populates a context variable called
previous_fields which contains raw HTML hidden fields for the previous step values and security hashes. This does not play well when you are trying to use the FormWizard in other types markup.
My use case is that I'm using extjs for my application front-end and form presentation (though I could be using something else like XForms for example). I have a templatetag that spits out the appropriate extjs form widget when given a
bound field. This fails for the
previous_fields because it is raw HTML.
The patch attached turns
previous_fields into a list of bound field objects that can be iterated over to output the same raw HTML as before or give you more control over the output.
Change History (16)
comment:5 Changed 6 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Accepted → Ready for checkin|
comment:6 Changed 6 years ago by
|Patch needs improvement:||set|
|Triage Stage:||Ready for checkin → Accepted|