React Form Package
Edit page
IntroductionInstallationFormSimple FormButtonBasic UsageUsage with actual valuesPropsFieldFieldWrapperRadioGroupSelectForm ValidationStateonFocus onChange onBlurState ManipulationCustom Error MessagesFeedback on disabled ButtonStylingDynamic FieldsDynamic Fields 2Dynamic Fields 3Bind Input FieldsBind Input Fields 2Third Party ComponentsFile UploadWhy

Button

This component has to be a child within the <Form /> component. This component gets the state from the <Form /> component and returns it on its onClick prop. If the <Form /> component has the validate prop set, the button will be disabled as long as the form is valid.

Basic Usage

import {
Form,
Button,
} from 'react-form-package';

Render a <Form /> with a <Button /> component.

Usage with actual values

import {
Form,
Button,
Field,
} from 'react-form-package';

Render a <Form /> with a <Button /> and a <Field /> component.

Email

Props

Property TypeRequiredDefaultDescription
id Stringtrue
typeStringtruesubmit
onClickFunc falsereturns the state of the form
onMouseEnterFuncfalsereturns the event and the state of the form
onMouseLeaveFuncfalsereturns the event and the state of the form (does not work on disabled buttons)
rfpRoleStringfalseonly needed for dynamically added fields, either addField or removeField
fieldIdStringfalse only needed for dynamically added fields on a button with rfpRole removeField (the id of the field to remove)
fieldObjectfalse only needed for dynamically added fields on a button with rfpRole addField. This object holds at least id, type, and may hold min, max, required, match, sameAs