Hi, I hope this is not a repeat. I tried posting several times and I was getting a 401 error. Anyway, here is my post:
Hello, I’m trying to learn how to save the data of a submitted form and fill the form again in case a validation error occur after the user submits the form.
I’m using Modx Revo on this one:
http://www.expresssignproducts.com/register.html
Here is a sample of the code:
<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>
<!-- more options -->
</select>
</label></td>
</tr>
The problem I have is that when there’s a validation error, the text fields (like city) are filled out again, but not the choice fields: so, "Province" defaults to Alberta again, regardless what the user chose.
How can I extend this feature to all fields?
Regards,
Eduardo