django - Fill fields with old value -


i having trouble find way fill form fields manually.

my process:

  1. fill form on frontend
  2. submit wrong data
  3. now want repopulate error field custom value based on old value

currently have overrided __init__ method , add field form self.base_fields['foo']. here able populate field custom way in init method can not access previous submited data (like self.cleaned_data.get('foo'))

i trying data in wrong method , right way this?

*i know fields auto-filled on form errors have special case here


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -