Fix saving checked value of custom select or radio
[MAILPOET-2643]
This commit is contained in:
committed by
Pavel Dohnal
parent
5bb6dcd6be
commit
22332b4735
@@ -19,7 +19,13 @@ function mapFormDataToParams(fieldType, data) {
|
||||
case 'select':
|
||||
return {
|
||||
required: data.mandatory ? '1' : undefined,
|
||||
values: data.values.map((value) => ({ value: value.name })),
|
||||
values: data.values.map((value) => {
|
||||
const mapped = { value: value.name };
|
||||
if (value.isChecked) {
|
||||
mapped.is_checked = '1';
|
||||
}
|
||||
return mapped;
|
||||
}),
|
||||
};
|
||||
case 'text':
|
||||
return {
|
||||
|
Reference in New Issue
Block a user