Form
This is a React component

Source
import { Form } from "@prestojs/final-form";
Form(props)

Wrapper around react-final-form with some extensions

1) You can pass a record to initialValues and it will pass through the underlying data to the form

2) final-form expects a function as a child which you then render a <form> element with and pass through handleSubmit. Most the time this is the same thing so you optionally just pass through renderable children and the form will be created implicitly for you.

ParameterTypeDescription
*props

Any of the final-form FormProps and the options shown below

props.formPropsRecord

Any extra props to pass through to the underlying form component. The form component used is determined by the formComponent passed to UiProvider or form if none is passed.

Note that this only applies if you pass children to Form. If you use render or component then it is ignored.

props.initialValuesFormValues|ViewModelInterface

Initial values for the form. Either an object or a ViewModel record.