Update example form names
This commit is contained in:
parent
048d875326
commit
9d2c5c4f22
3 changed files with 8 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = ''
|
||||
}) => (
|
||||
|
|
|
|||
|
|
@ -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> 😉
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue