I'm struggling to find the best way to display validation messages after a form which has been generated via ajax is submitted. Let me explain better: I've got a page that starts with a few options. Based on what the user selects from dropdowns and by adding new fields, the form is created and at the end the form is submitted.
The problem is that, even if I can do validation checks on the server, and display a general validation message on the page, I should pre-fill the form fields with the values that the user entered before pushing the submit button.
Have you ever had such a problem? How did you address this?