Is it possible to submit a form and the fields of that form after they are submitted to stay with values that they had, not to be empty ?
Asked
Active
Viewed 59 times
2 Answers
2
Using AJAX you can submit the form without leaving the page(and without erasing values), take a look at this answer Submit form using AJAX and jQuery
-
thanks @alebruck , I tried those ways on that link, they do submit without refreshing page, but still fields (WTForms fields) become empty after submitting ? – Babel May 12 '15 at 23:12
-
@Egzona No, submitting the form will not empty fields, take a look http://jsfiddle.net/YUWB2/734/ maybe you are doing something else that is cleaning it http://stackoverflow.com/questions/6364289/clear-form-fields-with-jquery – alebruck May 12 '15 at 23:30
0
I suggest you to use JS validation or HTML5 form validation if you don't want to use JavaScript.
I prefer the second way which is clearer, but not sure to work in every browser.

Zulu
- 8,765
- 9
- 49
- 56