Form with multiple address
Schema
{}
fields]
:
[[
…
][
…
][
…
]buttons]
:
[0}
:
{name
:
"Add"
meta}
:
{type
:
"submit"
displayName
:
"Next"
className
:
"col"
Usage
import React from "react";
import MuiForms from "mui-forms";
import schema from "./schema.json";
function FormWithMultipleAddress() {
return (
<MuiForms
config={{
loader: {
enabled: true
}
}}
schema={schema}
onNext={async (data) => {
const response = await axios.post("/submit", data);
return true;
}}
onSubmit={async (data) => {
const response = await axios.post("/submit", data);
// go to details page
// router.push("/details");
}}
/>
);
}