Tenant application
Screen prospective tenants for a unit.
Fields
Full nametextrequiredEmailemailrequiredPhonetelrequiredCurrent addresstextNumber of occupantsnumberDesired move-in datedateEmployertextI consent to a background checkcheckboxrequired
Code
import { useState } from "react";
export function TenantApplicationForm() {
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="current_address">Current address</label>
<input type="text" name="current_address" id="current_address" />
<label htmlFor="occupants">Number of occupants</label>
<input type="number" name="occupants" id="occupants" />
<label htmlFor="move_in">Desired move-in date</label>
<input type="date" name="move_in" id="move_in" />
<label htmlFor="employer">Employer</label>
<input type="text" name="employer" id="employer" />
<label>
<input type="checkbox" name="consent" id="consent" required /> I consent to a background check
</label>
<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.