Grouped Forms
Tab

Tabbed forms

Schema:

{
fields
:
[
0
:
{
name
:
"basic_details"
meta
:
{
type
:
"section"
displayName
:
"Basic Details"
}
fields
:
[
0
:
{
name
:
"first_name"
meta
:
{
}
}
1
:
{
name
:
"last_name"
meta
:
{
}
}
]
}
1
:
{
name
:
"other_details"
meta
:
{
type
:
"section"
displayName
:
"Other Details"
}
fields
:
[
0
:
{
name
:
"age"
meta
:
{
}
}
1
:
{
name
:
"email"
meta
:
{
}
}
]
}
]
}

Usage

import React from "react";
import schema from "./schema.json";
import MuiForms from "mui-forms";
 
function MyTab() {
    return (
        <MuiForms
            schema={schema}
            onSubmit={() => {
                // do nothing
            }}
        />
    );
}

Disable tab navigation

Schema:

{
fields
:
[
0
:
{
name
:
"basic_details"
meta
:
{
type
:
"section"
displayName
:
"Basic Details"
}
fields
:
[
0
:
{
name
:
"first_name"
meta
:
{
}
}
1
:
{
name
:
"last_name"
meta
:
{
}
}
]
}
1
:
{
name
:
"other_details"
meta
:
{
type
:
"section"
displayName
:
"Other Details"
isDisabled
:
true
}
fields
:
[
0
:
{
name
:
"age"
meta
:
{
}
}
1
:
{
name
:
"email"
meta
:
{
}
}
]
}
]
}

Star us at github

© Copyright 2023 MuiForms