0

My Form Data gets cleared out when I get a Validation Error. How can I stop this? I need that data to be preserved so that every time I do not need to start filling it all over again.

Kindly help me with any documents which points this issue. The Form is quite complex thus not posting any code here. I just need a reference where I can see such behaviour being handled in React-redux forms.

PS: I am just debugging a code written by someone else.

Sam_2207
  • 2,759
  • 2
  • 9
  • 15
  • That's not an issue with the form, it's an issue with the function triggered by onsubmit or their validation function. Without knowing a bit about those functions it's hard to point you in the right direction (right now the direction would be very broad: how to validate a form) – Sydney Y Feb 11 '20 at 13:32
  • This is the most common issue: https://stackoverflow.com/questions/19454310/stop-form-refreshing-page-on-submit – Sydney Y Feb 11 '20 at 13:34
  • Hard to see what is going wrong without any code. Does the submit form contain event.preventdefault();? – Donzen Feb 11 '20 at 15:09

0 Answers0