Rental application
Collect applicant details for a rental property.
Fields
Full nametextrequiredEmailemailrequiredPhonetelrequiredProperty addresstextrequiredDesired move-in datedateMonthly incomenumberDo you have pets?checkboxAdditional notestextarea
Preview
Code
<script lang="ts">
let sent = $state(false);
async function onSubmit(e: SubmitEvent) {
e.preventDefault();
const form = e.target as HTMLFormElement;
const res = await fetch("https://formward.eu/f/your-form-id", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
if (res.ok) {
sent = true;
form.reset();
}
}
</script>
{#if sent}
<p>Thanks! Your message has been sent.</p>
{:else}
<form onsubmit={onSubmit}>
<label for="name">Full name</label>
<input type="text" name="name" id="name" required />
<label for="email">Email</label>
<input type="email" name="email" id="email" required />
<label for="phone">Phone</label>
<input type="tel" name="phone" id="phone" required />
<label for="property">Property address</label>
<input type="text" name="property" id="property" required />
<label for="move_in">Desired move-in date</label>
<input type="date" name="move_in" id="move_in" />
<label for="income">Monthly income</label>
<input type="number" name="income" id="income" />
<label>
<input type="checkbox" name="pets" id="pets" /> Do you have pets?
</label>
<label for="notes">Additional notes</label>
<textarea name="notes" id="notes"></textarea>
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="position:absolute;left:-9999px" aria-hidden="true" />
<button type="submit">Send</button>
</form>
{/if}
Use this with Formward
Create a form, copy your endpoint, and replace https://formward.eu/f/your-form-id in the code above.