Skip to content

Commit

Permalink
Update Formbuilder/Formbuilder.php
Browse files Browse the repository at this point in the history
I've noticed it can be saved as the value, therefore now looks for "true" || "checked" as options
  • Loading branch information
causehacker committed Dec 5, 2012
1 parent a0d4aa3 commit 66735ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Formbuilder/Formbuilder.php
Expand Up @@ -409,7 +409,7 @@ protected function loadSelectBox($field){
}
$field['values'] = (array)$field['values'];
if(isset($field['values']) && is_array($field['values'])){
$multiple = $field['multiple'] == "true" ? ' multiple="multiple"' : '';
$multiple = $field['multiple'] == "true" || $field['multiple'] == "checked" ? ' multiple="multiple"' : '';
$html .= sprintf('<select name="%s" id="%s"%s>' . "\n", $this->elemId($field['title']), $this->elemId($field['title']), $multiple);
if($field['required']){ $html .= '<option value="">Selection Required</label>'; }

Expand Down

0 comments on commit 66735ae

Please sign in to comment.