Closed dxcore35 closed 2 months ago
That is because the values need to be provided as a separate argument:
const result = await modalForm.openForm({
title: "Example form",
fields: [
{
name: "name",
label: "Name",
description: "Your name",
input: { type: "date" },
},
{
name: "age",
label: "Age",
description: "Your age",
input: { type: "datetime" },
},
{
name: "summary",
label: "Summary",
description: "Summary of the project",
input: { type: "text" },
},
{
name: "is_family",
label: "Is family",
type: "toggle",
description: "Are you family?",
required: true,
input: { type: "toggle" },
},
],
}, { values: { summary, age: date_finished, name: date_start }});
I tried to provide default values in this code:
By adding:
The the form will open with no values.