Forms & Last Step

- fixed issues on forms
- added defaultValue on text/textarea fields
- added all actions on step 3
This commit is contained in:
Jonathan Labreuille
2015-10-01 14:22:53 +02:00
parent 39b2a2ad40
commit dc2b3733d7
8 changed files with 74 additions and 43 deletions

View File

@@ -10,11 +10,16 @@ function(
<input
type="text"
className={ (this.props.field.size) ? '' : 'regular-text' }
size={ (this.props.field.size !== 'auto') ? this.props.field.size : false }
size={
(this.props.field.size !== 'auto' && this.props.field.size > 0)
? this.props.field.size
: false
}
name={ this.props.field.name }
id={ 'field_'+this.props.field.name }
value={ this.props.item[this.props.field.name] }
placeholder={ this.props.field.placeholder }
defaultValue={ this.props.field.defaultValue }
onChange={ this.props.onValueChange } />
);
}