FormField
Extends:
react~Component → FormField
FormField is a component to present field and is used in Form component
FormField is a wrapper for Semantic UI-React's Form.Field component, so all properties of that component can be used here.
Access
Stage.Basic.Form.Field
Usage
FormField with no error
FormField with error
FormField with help information, label and required indication
<Form onSubmit={this._createTenant.bind(this)} errors={this.state.errors} ref='createForm'>
<Form.Field error={this.state.errors.tenantName}>
<Form.Input name='tenantName' placeholder='Tenant name'
value={this.state.tenantName} onChange={this._handleInputChange.bind(this)}/>
</Form.Field>
</Form>
Static Member Summary
Static Public Members | ||
public static |
propTypes: * propTypes |
Static Public Members
public static propTypes: * source
propTypes
Properties:
Name | Type | Attribute | Description |
error | any |
|
error indicator: true - field has error, false - field has no errors (value casted to boolean by !!error) |
help | string | element |
|
if not empty, then help description is shown in popup on field's hover and focus |
label | string |
|
if not empty, then it's content is shown on top of field |
required | boolean |
|
if true and label is set, then red asterisk icon is presented near label |