Employment application
Formal employment application with availability.
Fields
Full nametextrequiredEmailemailrequiredPhonetelrequiredPositiontextrequiredEmployment typeselectAvailable start datedateExpected salarynumberSummary of experiencetextarea
Code
import { useState } from "react";
export function EmploymentApplicationForm() {
const [sent, setSent] = useState(false);
async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
const form = e.currentTarget;
const res = await fetch("https://formward.eu/f/your-form-id", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
if (res.ok) {
setSent(true);
form.reset();
}
}
if (sent) return <p>Thanks! Your message has been sent.</p>;
return (
<form onSubmit={onSubmit}>
<label htmlFor="name">Full name</label>
<input type="text" name="name" id="name" required />
<label htmlFor="email">Email</label>
<input type="email" name="email" id="email" required />
<label htmlFor="phone">Phone</label>
<input type="tel" name="phone" id="phone" required />
<label htmlFor="position">Position</label>
<input type="text" name="position" id="position" required />
<label htmlFor="type">Employment type</label>
<select name="type" id="type">
<option value="Full-time">Full-time</option>
<option value="Part-time">Part-time</option>
<option value="Contract">Contract</option>
<option value="Internship">Internship</option>
</select>
<label htmlFor="start_date">Available start date</label>
<input type="date" name="start_date" id="start_date" />
<label htmlFor="salary">Expected salary</label>
<input type="number" name="salary" id="salary" />
<label htmlFor="summary">Summary of experience</label>
<textarea name="summary" id="summary" />
<input
type="text"
name="_gotcha"
tabIndex={-1}
autoComplete="off"
style={{ position: "absolute", left: "-9999px" }}
aria-hidden="true"
/>
<button type="submit">Send</button>
</form>
);
}
Use this with Formward
Create a form, copy your endpoint, and replace https://formward.eu/f/your-form-id in the code above.