Update example form names

This commit is contained in:
Jinksi 2017-11-18 14:41:27 +10:00
parent 048d875326
commit 9d2c5c4f22
3 changed files with 8 additions and 4 deletions

View file

@ -5,6 +5,10 @@ import { color } from '../globalStyles'
const fetch = window.fetch
class Form extends Component {
static defaultProps = {
name: 'Controlled Form'
}
state = {
name: '',
email: '',
@ -14,7 +18,7 @@ class Form extends Component {
disabled: false,
alert: '',
action: '/contact/',
'form-name': 'Contact'
'form-name': this.props.name
}
form = null

View file

@ -3,7 +3,7 @@ import styled from 'styled-components'
import { color } from '../globalStyles'
export default ({
name = 'SimpleForm',
name = 'Simple Form',
subject = '', // optional subject of the notification email
action = ''
}) => (

View file

@ -15,10 +15,10 @@ export default ({ page, site }) => (
<Marked source={page.content} />
<br />
<h3>{'<NetlifyControlledForm />'}</h3>
<NetlifyControlledForm />
<NetlifyControlledForm name={'Controlled Form'} />
<br />
<h3>{'<NetlifySimpleForm />'}</h3>
<NetlifySimpleForm />
<NetlifySimpleForm name='Simple Form' />
<em>Note: these will only work when deployed on Netlify</em>
<br />
<em>Also, they are active and I will receive submissions</em> 😉