diff --git a/module/applications/config/Action.mjs b/module/applications/config/Action.mjs index 109ad503..52a30918 100644 --- a/module/applications/config/Action.mjs +++ b/module/applications/config/Action.mjs @@ -70,7 +70,9 @@ export default class DaggerheartActionConfig extends DaggerheartSheet(Applicatio } static async updateForm(event, _, formData) { - const data = foundry.utils.expandObject(foundry.utils.mergeObject(this.action.toObject(), formData.object)); + const data = foundry.utils.expandObject( + foundry.utils.mergeObject(this.action.toObject(), foundry.utils.expandObject(formData.object)) + ); const newActions = this.action.parent.actions.map(x => x.toObject()); if (!newActions.findSplice(x => x.id === data.id, data)) { newActions.push(data); diff --git a/templates/views/action.hbs b/templates/views/action.hbs index 45d91c80..0b034ea4 100644 --- a/templates/views/action.hbs +++ b/templates/views/action.hbs @@ -1,6 +1,6 @@
- {{formField fields.name value=source.name label="Name" rootId=partId}} + {{formField fields.name value=source.name label="Name" name="name" rootId=partId}}
@@ -39,16 +37,15 @@
Cost
-
-
- {{formField fields.cost.fields.type value=source.cost.type label="Cost Type" rootId=partId}} - {{formField fields.cost.fields.value value=source.cost.value label="Value" rootId=partId}} +
+ {{formField fields.cost.fields.type value=source.cost.type label="Cost Type" name="cost.type" rootId=partId}} + {{formField fields.cost.fields.value value=source.cost.value label="Value" name="cost.value" rootId=partId}}
- {{formField fields.target.fields.type value=source.target.type label="Target Type" rootId=partId}} + {{formField fields.target.fields.type value=source.target.type label="Target Type" name="target.type" rootId=partId}}
{{!--