10390 Posts in 2202 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 542 Views |
-
User Defined Forms customisation

26 April 2010 at 9:50pm Last edited: 26 April 2010 9:53pm
I've created a form field, which is just Yes/No
class EditableYesNoField extends EditableMultipleOptionField {
static $singular_name = 'Yes/No Field';
static $plural_name = 'Yes/No Fields';
function getFormField() {
$optionSet = $this->Options();
$options = array('yes' => 'Yes', 'no' => 'No');
/*if($optionSet) {
foreach( $optionSet as $option ) {
$options[$option->Title] = $option->Title;
}
}*/
return new OptionsetField($this->Name, $this->Title, $options);
}
}This works fine but how do I create a group of them?
| 542 Views | ||
|
Page:
1
|
Go to Top |

