---
import Layout from '../components/Layout.astro';
const method = Astro.url.searchParams.get('method') ?? 'POST';
const enctype = Astro.url.searchParams.get('enctype');
const postShowThrow = Astro.url.searchParams.has('throw') ?? false;
---

<Layout>
	<h2>Contact Form</h2>
	<form action="/contact" method={method} {...enctype ? { enctype } : {}}>
		<input type="hidden" name="name" value="Testing" />
		{postShowThrow ? <input type="hidden" name="throw" value="true" /> : ''}
		<input type="submit" value="Submit" id="submit" />
	</form>
</Layout>
