How to get values of form before submit in useStepForm?
How to get values of form before submit in useStepForm?
onFinish with the final values you want to submit.submitsubmitsubmitconst {
// ... other properties
submit
} = useStepsForm({
submit: (values) => {
console.log(values); // Here you can access the form values
// Modify the values if needed
const modifiedValues = {
...values,
// Add or modify fields as necessary
};
// Call onFinish with the modified values
onFinish(modifiedValues);
},
});