Submit form but not unload fields

时间:2015-05-12 22:53:02

标签: jquery python html wtforms

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 ?

2 个答案:

答案 0 :(得分: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

答案 1 :(得分: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.