Skip to content

Instantly share code, notes, and snippets.

@ericdfields
Last active March 2, 2017 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericdfields/29db0bc82344f06907e1d6d214e2ef8e to your computer and use it in GitHub Desktop.
Save ericdfields/29db0bc82344f06907e1d6d214e2ef8e to your computer and use it in GitHub Desktop.
class EditPersonForm extends Component {
render() {
const { handleSubmit } = this.props
return (
<form onSubmit={handleSubmit}>
<div>
<label htmlFor="first_name">First Name</label>
<Field name="first_name" component="input" />
</div>
<div>
<label htmlFor="last_name">Last Name</label>
<Field name="last_name" component="input" />
</div>
<div>
<label htmlFor="notes">Notes</label>
<Field name="notes" component="textarea" />
</div>
<FieldArray name="phone_numbers" component={renderPhoneNumbers}/>
<button type="submit">Submit</button>
</form>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment