added ability to use multi select widgets as for array type data

This commit is contained in:
Dan Bate 2018-06-26 11:23:30 +01:00
parent cf85ac97fd
commit 2dab29ca1b

View File

@ -132,11 +132,18 @@ $(function () {
params[paramKey] = value
}
} else if (dataType === 'array' && paramValue) {
if($elem.is('select')){
if(!(paramKey in params)) {
params[paramKey] = []
}
params[paramKey].push(paramValue)
} else {
try {
params[paramKey] = JSON.parse(paramValue)
} catch (err) {
// Ignore malformed JSON
}
}
} else if (dataType === 'object' && paramValue) {
try {
params[paramKey] = JSON.parse(paramValue)