Form_Field_Conditional_Model Class Reference
If you want to make form fields dependant on other fields, you should use this class.
More...
Detailed Description
If you want to make form fields dependant on other fields, you should use this class.
Usage:
$my_field = new Form_Field_Option_Model('species', array('crocodile', 'elephant', 'tripod')); // only tripods have enemies, of course: $number_of_enemies = new Form_Field_Conditional_Model( 'species', 'tripod', new Form_Field_Number_Model( 'enemies', 'Number of enemies'));
By declaring the number of enemies as dependant of another field's value, we get the validation, server side- and client side rendering for free. Yay!
Constructor & Destructor Documentation
Form_Field_Conditional_Model::__construct |
( |
$ |
rel, |
|
|
$ |
value, |
|
|
Form_Field_Model $ |
field | |
|
) |
| | |
Member Function Documentation
Form_Field_Conditional_Model::get_field |
( |
|
) |
|
Form_Field_Conditional_Model::get_rel |
( |
|
) |
|
Form_Field_Conditional_Model::get_type |
( |
|
) |
|
Form_Field_Conditional_Model::get_value |
( |
|
) |
|
Form_Field_Conditional_Model::process_data |
( |
array $ |
raw_data, |
|
|
Form_Result_Model $ |
result | |
|
) |
| | |
The documentation for this class was generated from the following file:
- form_field_conditional.php