Skip to content

Commit 5bb96a4

Browse files
committed
Fix form submission to use Formspree redirect to contact2
1 parent 886a9e5 commit 5bb96a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

project/src/pages/contact.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import Layout from '../layouts/Layout.astro';
1111

1212
<form class="form" action="https://formspree.io/f/{2901755203076226289}" method="POST">
1313

14+
<input type="hidden" name="_next" value={`${import.meta.env.BASE_URL}contact2`} />
15+
1416
<label for="name">Name:</label><br>
1517

1618
<input type="text" id="name" name="name" required><br><br>
@@ -31,7 +33,7 @@ import Layout from '../layouts/Layout.astro';
3133

3234
<textarea id="message" name="message" rows="4" required></textarea><br><br>
3335

34-
<strong><a href={`${import.meta.env.BASE_URL}contact2`}><button type="button" class="submit-button">Submit</button></a></strong>
36+
<strong><button type="submit" class="submit-button">Submit</button></strong>
3537

3638
</form>
3739

0 commit comments

Comments
 (0)