From 9d2c5c4f224e67a319eb35f91c5cc984372cfaef Mon Sep 17 00:00:00 2001 From: Jinksi Date: Sat, 18 Nov 2017 14:41:27 +1000 Subject: [PATCH] Update example form names --- src/components/NetlifyControlledForm.js | 6 +++++- src/components/NetlifySimpleForm.js | 2 +- src/views/Contact.js | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/NetlifyControlledForm.js b/src/components/NetlifyControlledForm.js index a92cf2e..9a32f83 100644 --- a/src/components/NetlifyControlledForm.js +++ b/src/components/NetlifyControlledForm.js @@ -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 diff --git a/src/components/NetlifySimpleForm.js b/src/components/NetlifySimpleForm.js index b2a1f7d..ab10a09 100644 --- a/src/components/NetlifySimpleForm.js +++ b/src/components/NetlifySimpleForm.js @@ -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 = '' }) => ( diff --git a/src/views/Contact.js b/src/views/Contact.js index 26d1904..dc7eaf9 100644 --- a/src/views/Contact.js +++ b/src/views/Contact.js @@ -15,10 +15,10 @@ export default ({ page, site }) => (

{''}

- +

{''}

- + Note: these will only work when deployed on Netlify
Also, they are active and I will receive submissions 😉