FunctionuseFormSubmissionState
- useFormSubmissionState(form, initialSubmission?, lastElementUpdated?, sectionState?): [{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}, Dispatch<SetStateAction<{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}>>] Parameters
- form: Form
OptionalinitialSubmission: {
[name: string]: unknown;
}OptionallastElementUpdated: FormElementOptionalsectionState: {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[]
Returns [{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}, Dispatch<SetStateAction<{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}>>]
This function is a simple wrapper around the react hook
useState(). The results can be passed to the<OneBlinkForm />//TODO: Fix link component.Example