`` is Higher-Order Component which encapsulates entire form logic
and provides with children required props. This component structure provides
comfort API and allows to create typical Foris module forms easily.
## Example of usage of ``
You can pass more forms as children.
```js
```
### Example of children forms `props` usage
```js
export default function MACForm({
formData,
formErrors,
setFormValue,
...props
}) {
const macSettings = formData.mac_settings;
const errors = (formErrors || {}).mac_settings || {};
return (
<>
{_("MAC")}
({
mac_settings: { custom_mac_enabled: { $set: value } },
}))}
{...props}
/>
{macSettings.custom_mac_enabled ? (
({
mac_settings: { custom_mac: { $set: value } },
}))}
{...props}
/>
) : null}
>
);
}
```
The passes subsequent `props` to the child components.
| Prop | Type | Description |
| -------------- | ------ | -------------------------------------------------------------------------- |
| `formData` | object | Data returned from API. |
| `formErrors` | object | Errors returned after validation via validator. |
| `setFormValue` | func | Function for data update. It takes update rule as arg (see example above). |
| `disabled` | bool | Flag to disable form elements (during updates or loadings e.t.c.). |