Skip to content

Instantly share code, notes, and snippets.

@kettanaito
Last active April 22, 2018 11:06
Show Gist options
  • Save kettanaito/5ec1864ca98acef499f07569b1c0297b to your computer and use it in GitHub Desktop.
Save kettanaito/5ec1864ca98acef499f07569b1c0297b to your computer and use it in GitHub Desktop.
React Advanced Form - Field group
// src/app/RegistrationForm.jsx
import React from 'react';
import { Form, Field } from 'react-advanced-form';
import { Input } from '...';
export default class RegistrationForm extends React.Component {
render() {
<Form>
<Field.Group name="primaryInfo">
<Input
name="userEmail"
type="email"
required />
</Field.Group>
<Input
name="userPassword"
type="password"
required />
<Input
name="confirmPassword"
type="password"
required />
<Field.Group name="primaryInfo">
<Input
name="firstName" />
<Input
name="lastName" />
</Field.Group>
<button>Register</button>
</Form>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment