Creating form
React Advanced form treats any form as a composition of fields. Therefore, creating a form is a trivial procedure of rendering field components as the form's children.
Make sure you have field components defined before proceeding with this step.

Example

1
import React from 'react'
2
import { Form } from 'react-advanced-form'
3
4
/* Fields */
5
import { Input, Checkbox } from '../fields'
6
7
export default class ExampleForm extends React.Component {
8
render() {
9
return (
10
<Form>
11
<Input
12
name="userEmail"
13
required />
14
<Input
15
name="userPassword"
16
type="password"
17
required />
18
<Checkbox
19
name="termsAndConditions" />
20
</Form>
21
)
22
}
23
}
Copied!
Last modified 3yr ago
Copy link
Contents
Example