Manual Reference Source
public class | source

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

FormField with error

FormField

FormField with help information, label and required indication

FormField

<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

Static Public Members

public static propTypes: * source

propTypes

Properties:

NameTypeAttributeDescription
error any
  • optional
  • default: false

error indicator: true - field has error, false - field has no errors (value casted to boolean by !!error)

help string | element
  • optional
  • default: ''

if not empty, then help description is shown in popup on field's hover and focus

label string
  • optional
  • default: ''

if not empty, then it's content is shown on top of field

required boolean
  • optional

if true and label is set, then red asterisk icon is presented near label