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,10 +132,17 @@ $(function () {
params[paramKey] = value params[paramKey] = value
} }
} else if (dataType === 'array' && paramValue) { } else if (dataType === 'array' && paramValue) {
try { if($elem.is('select')){
params[paramKey] = JSON.parse(paramValue) if(!(paramKey in params)) {
} catch (err) { params[paramKey] = []
// Ignore malformed JSON }
params[paramKey].push(paramValue)
} else {
try {
params[paramKey] = JSON.parse(paramValue)
} catch (err) {
// Ignore malformed JSON
}
} }
} else if (dataType === 'object' && paramValue) { } else if (dataType === 'object' && paramValue) {
try { try {