django - Fill fields with old value -
i having trouble find way fill form fields manually.
my process:
- fill form on frontend
- submit wrong data
- 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
Post a Comment