Skip to content

Instantly share code, notes, and snippets.

@ericdfields
Last active March 2, 2017 21:56
Show Gist options
  • Select an option

  • Save ericdfields/29db0bc82344f06907e1d6d214e2ef8e to your computer and use it in GitHub Desktop.

Select an option

Save ericdfields/29db0bc82344f06907e1d6d214e2ef8e to your computer and use it in GitHub Desktop.

Revisions

  1. Eric Fields revised this gist Mar 2, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion form.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    class EditPrescriberForm extends Component {
    class EditPersonForm extends Component {
    render() {
    const { handleSubmit } = this.props
    return (
  2. Eric Fields created this gist Mar 2, 2017.
    23 changes: 23 additions & 0 deletions form.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    class EditPrescriberForm 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>
    );
    }
    }