Hello, I’m trying to figure out how to save the data filled in a form after a user submits it and the form contains error, so that users don’t have to enter everything again.
This is my problem: our website we have this registration page
http://www.expresssignproducts.com/register.html. If there’s a validation error, you’re presented with the same form, of course, and even though some data is saved, like the text fields name, phone, etc., all select fields are not. How can I save all the fields, then?
Here’s a sample of the html:
<tr bgcolor="#fffacd">
<td align="right">City <span class="RequiredField">*</span></td>
<td align="left">
<label>
<input id="City" maxlength="25" name="city:required" size="25" type="text" value="[[+city]]" />
[[+error.city]] </label>
</td>
</tr>
<tr>
<td align="right">Province/State</td>
<td align="left"><label>
<select id="Province" name="state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option selected="selected" value="AB">Alberta</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="BC">British Columbia</option>
<!--more values-->
</select>
</label></td>
</tr>
So, whenever there is an error, the form saves the city typed by the registrant, but the province/state is reverted to "Alberta".
Thanks!
Eduardo