Snippet List
This form widget allows you to just display data in a rendered form, not giving the user the opportunity to change it. The initial data will just be carried through the form and showed to the user.
In combination with snipped [1184](http://www.djangosnippets.org/snippets/1184/) you can make this even tamper safe. ;-)
- newforms
- forms
- display
- content
This snippet prevents people from tampering with the data in hidden form fields. This is something you usually want unless you have some Javascript Vodoo going on on the browser side.
For the people scratching their heads:
This form class will dynamically create a clean function for every passed additional hidden field, which just returns the original value of the hidden field. So the data in the hidden field posted gets actually ignored when calling the (overwritten) clean_{field name} function.
This class is just an example using the protected hidden field feature for all passed field variables, which is probably not what you want.
You have to add the editable fields the end of the __init__ function in the class. Example:
`self.fields['bestbeer'] = forms.CharField(max_length=23)`
- newforms
- field
- hidden
- froms
alexmeisel has posted 2 snippets.