When dealing with multiple radios, and using eform_options="...", eform_options seems to make it through to the generated HTML while eform="..." does not. Odd... eform is functioning great, even on MULTIPLE radios, e.g. named "myRadios[]"
-
- 1,010 Posts
Where did you get this "eform_options" from?
eForm only works with eform="..." and only strips those from the source sao it’s no wonder you see the eform_options in the page source.
That the radios work anyway is because eForm automatically adds validation to them based on the radio values in the form template. Same with check boxes and select boxes.
Quote from: TobyL at Jan 09, 2007, 02:37 AM
Where did you get this "eform_options" from?
eForm only works with eform="..." and only strips those from the source
LoL. From the Docs in the 1.4.3 download
Quote from: "eform.htm"
Form field examples with validation
1. Selectbox - set as required field (no validation required)
<select name="mySelect" eform_options="Select Country::1" /> (datatype left blank)
<option value="en-au">Australia</option>
<option value="en-us">USA</option>
</select>
2. Textbox - required and format set to date
<input type="text" name="dobDate" eform_options="Date of Birth:date:1:@EVAL return (strtotime($value)!==-1)?true:false;" />
3. Multiple checkbox - required, eform_options only set once.
<input type="checkbox" name="myColors[]" value="Red" eform_options="Colors::1" /> (datatype left blank)
<input type="checkbox" name="myColors[]" value="Green" /> (datatype left blank)
-
- 1,010 Posts
LOL
I better update the docs then....
Docs still reference some of the old/original placeholder styles: [.blah.]
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
:D Thanks for doing such a great job on this code.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me