Open Pavel-Nosov opened 9 years ago
js2form: list of values doesn't bind to multiselect. Example: I need to map object:
var x = { levels : ["DEBUG, ""INFO"] }; js2form(form, x);
to the form with the control:
<select id="levels" name="levels" multiple="multiple"/>
It seems to me that js2form required select name "levels[]", but it's not correct fully. The fix could look like addition another last "if" branch to the js2form function, I suppose:
else if (typeof formFieldsByName[fieldName.replace(_arrayItemRegexp, '')] != 'undefined') { setValue(formFieldsByName[fieldName.replace(_arrayItemRegexp, '')], fieldValue); }
js2form: list of values doesn't bind to multiselect. Example: I need to map object:
to the form with the control:
It seems to me that js2form required select name "levels[]", but it's not correct fully. The fix could look like addition another last "if" branch to the js2form function, I suppose: