FormFieldcomponent
FormField({ name, ...props }: InputProps): ReactElement| Param | Type | |
|---|---|---|
props | InputProps | Base props shared by every form input (name, title, placeholder, required/disabled state, and error message). required |
.name | string | The name="" prop of the input. required |
.title | string | Friendly title for the input. |
.placeholder | string | Placeholder for the input. Defaults to title. Set to "" to show no placeholder. |
.required | boolean | Whether the input is required. |
.disabled | boolean | Whether the input is disabled. |
.message | string | Any error message for the input. |
| Return | |
|---|---|
ReactElement | A <Field> wrapping a SchemaInput bound to the named field. |
Show a <Field> (label, input, and message) for a single named property of the current form.
Examples
<FormField name="email" />