Skip to content

Commit

Permalink
feat: add form submission success page
Browse files Browse the repository at this point in the history
  • Loading branch information
jlengstorf committed Sep 28, 2021
1 parent f132f04 commit 2a4017b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pages/netlify-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ export default function FunctionsPage() {
<main>
<h2 className={styles.heading}>Make this form functional</h2>

<form className={styles.form} name="contact" data-netlify>
<form
className={styles.form}
method="POST"
name="contact"
data-netlify="true"
action="/success"
>
<label htmlFor="name">Name</label>
<input type="text" id="name" name="name" />

Expand Down
14 changes: 14 additions & 0 deletions pages/success.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Layout from '../components/layout';

export default function FunctionsPage() {
return (
<Layout
title="Netlify Forms"
description="Turn any HTML form into a functional form that can receive submissions with a single line of code."
>
<main>
<h2>Submission received!</h2>
</main>
</Layout>
);
}

0 comments on commit 2a4017b

Please sign in to comment.