I can’t seem to validate this select box with eForm
<select name="age" id="fAge" size="">
<option></option>
<option value="12-15">12-15</option>
<option value="16-20">16-20</option>
<option value="21-25">21-25</option>
<option value="26-30">26-30</option>
<option value="31-40">31-40</option>
<option value="41-50">41-50</option>
<option value="51-65">51-65</option>
<option value="65+">65+</option>
</select>
Basically I want to make sure the first option isn’t selected,
Anyone know the proper way to do this with eform?
I tried eform="Age::1"
and eform="Age::1::#LIST comma separated list of valid options"
but to no avail.
Any help would be greatly appreciated
Ah ha..
You’re right... it does work as expected.
I stuck all of my select menus in chunks (because they are used in multiple forms),
but the eform=’’ attribute seems to be ignored by the eform snippet when used used in a chunk.
Do you know of a way around this?
Thanks for looking into this for me, either way I know what the problem is.
It get’s ignored because the chunk is replaced by MODx after eForm is finished processing so all that eForm sees is "{{ChunkName}}" The easiest solution is to not use a chunk.. The other option is to create an event function for the eFormOnBeforeParse event and insert the chunk into the template in that function. Search around the forum for some examples...