Created
July 21, 2009 02:15
-
-
Save favrik/151056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form: | |
LAYOUT METHOD ACTION | |
ATTRIB=VALUE ATTRIB2=VALUE2 | |
group: | |
LEGEND | |
ATTRIB=VALUE | |
FIELD1: | |
TYPE LABEL | |
VALIDATION1 VALIDATION2 VALIDATION3 | |
------------------- | |
Resulting array should be: | |
public $base_form = array( | |
'layout' => 'LAYOUT', | |
'method' => 'METHOD', | |
'action' => 'ACTION', | |
'attrib' => array( | |
'ATTRIB' => 'VALUE', | |
'ATTRIB2' => 'VALUE2' | |
), | |
'groups' => array( | |
array( | |
'legend' => 'LEGEND', | |
'attrib' => array( | |
'ATTRIB' => 'VALUE' | |
), | |
'fields' => array( | |
'FIELD1' => array( | |
'name' => 'FIELD1', | |
'type' => 'TYPE', | |
'label' =>'LABEL', | |
'validations' => array( | |
'VALIDATION1', | |
'VALIDATION2', | |
'VALIDATION3' | |
) | |
) | |
) | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment