-
☆ A M B ☆
- 24,524 Posts
Each required field needs the "required" section of the eform pseudo-attribute set to 1.
From the documentation that comes with eform:
Datatypes and formatting
eForm is incorporating a form parser which extracts formatting and validation options from each form field. To set options for a field add the eform(pseudo) attribute to each required form field.
<input type="text" name="color" eform="A Color:string:1" />
The basic format of the eform attribute is:
[description/title]:[datatype]:[required]:[validation message]:[validation rule]
And further on, some examples:
1. Selectbox - set as required field (no validation required)
<select name="mySelect" eform="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="Date of Birth:date:1:@EVAL return (strtotime($value)!==-1)?true:false;" />
3. Multiple checkbox - required, eform only set once.
<input type="checkbox" name="myColors[]" value="Red" eform="Colors::1" /> (datatype left blank)
<input type="checkbox" name="myColors[]" value="Green" /> (datatype left blank)
-
☆ A M B ☆
- 24,524 Posts
Yeah, I think it’s just one of those things that are presumed to be obvious, which of course it is - if you know about it! Like telling somebody how to drive a car "step on the gas to go, and the brake to stop". Um... what’s the "gas" and what’s the "brake", and this car has three pedals