Overview
Forms can be created in two ways - either by using the Form component which has a basic Submit
button wand a Reset
button to reset all fields, and by creating a custom form component using specific input components like Text, Image, Rich Text and so on.
Example: Building a Create User form
Here's how you can build a simple create user form.
Using the Form component
- Drag and drop the form component onto the canvas.
- Create the fields for the form and specify their type.
For example Name
and Email
are Text input types, Experience
is a dropdown with some options and Gender
is a Radio type with Male and Female options.
- This is the easiest way to create a form which comes in with a Submit and a Reset button.
- The form can be submitted by attaching an
onSubmit
handler to the form.
Using input fields
- Drag and drop the text, radio, dropdown input components for the respective fields.
- Drag and drop the button component.
- Group all the components together and create the form.
- The form can be submitted by attaching an
onClick
handler to the button.