Skip to content

Commit ca9e33f

Browse files
committed
Fixes #7723 - saving multi select field in UI component form
1 parent 424c113 commit ca9e33f

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/Ui/view/base/web/js/form

1 file changed

+5
-0
lines changed

app/code/Magento/Ui/view/base/web/js/form/form.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ define([
5454
}
5555
break;
5656

57+
case 'select-multiple':
58+
var name = item.name.substring(0,(item.name.length - 2)); //remove [] from the name ending
59+
result[name] = Array.prototype.slice.call(item.selectedOptions).map(function(o) {return o.value;});
60+
break;
61+
5762
default:
5863
result[item.name] = item.value;
5964
}

0 commit comments

Comments
 (0)