Reputation: 87
I have an Express.js application and I would like to know how I can persist form data (text area) after a post request without using AJAX.
I hope I am not vague. Thanks in advance.
Upvotes: 0
Views: 103
Reputation: 943831
The default value of a textarea
is the child text node inside it. Copy the data into there, and put it in the response you make to the submission request:
<textarea name="foo">HTML escaped copy of the previously submitted foo</textarea>
Upvotes: 1