silverstripe-userforms/code/formfields/UserFormsCheckboxSetField.php
2014-07-25 14:53:13 +12:00

23 lines
410 B
PHP

<?php
/**
* @package userforms
*/
class UserFormsCheckboxSetField extends CheckboxSetField {
/**
* jQuery validate requires that the value of the option does not contain
* the actual value of the input.
*
* @return ArrayList
*/
public function getOptions() {
$options = parent::getOptions();
foreach($options as $option) {
$option->Name = "{$this->name}[]";
}
return $options;
}
}