mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
23 lines
410 B
PHP
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;
|
||
|
}
|
||
|
}
|