Re: retaining the data on validation error using newforms

2007-07-30 Thread Doug B
Everything can be changed. Look under auto_id in the newforms docs on djangoproject.com. The default does it exactly the way you seem to be, prepending 'id_' to the field name. If you want to set a class, you need to change the attrs dict on the field's widget. All a newforms field really cons

retaining the data on validation error using newforms

2007-07-30 Thread james_027
Hi, this is how I am using the newforms. My Form class NewEmployeeForm(forms.Form): contract_from = forms.DateField() contract_to = forms.DateField() position = forms.CharField(max_length=20) My View def create_employee(request): f = None if request.method == 'POST':