Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #14 from noinput/master

Multiple selection fix
  • Loading branch information...
commit a780f9292e6704bf1076b273b00b4b05e0a1c98d 2 parents a901a1b + d46d218
@viveleroi authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  Formbuilder/Formbuilder.php
  2. +1 −1  js/jquery.formbuilder.js
View
2  Formbuilder/Formbuilder.php
@@ -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>'; }
View
2  js/jquery.formbuilder.js
@@ -256,7 +256,7 @@
var title = '';
if (typeof (options) === 'object') {
title = options[0];
- multiple = options[1] === 'true' ? true : false;
+ multiple = options[1] === 'true' || options[1] === 'checked' ? true : false;
}
field += '<div class="opt_group">';
field += '<div class="frm-fld"><label>' + opts.messages.title + '</label>';
Please sign in to comment.
Something went wrong with that request. Please try again.