Rental application form you can use today
Every applicant answers the same questions in the same order, so comparing three applications for one flat takes minutes. Change the wording, remove a field, or add one in the field editor. A form can have up to 20 fields.
New: open this form in the form builder to give it your site's colours and font and get the code for WordPress, Shopify, Wix or Webflow.
1. Start from a form
Or describe the form and let AI fill in the fields
Only your description goes to the AI model. The answer replaces the fields above it, and you can edit them like any other.
2. Edit the fields
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
-
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
Files need Uploads turned on for your form, plus the CAPTCHA widget from its Connect page. PDF, JPEG or PNG, up to 5 MB each.
3. Check the live preview
This is the HTML tab, rendered. Paste your access key in step 4 and the button sends a real test submission.
4. Add your access key
Every copy below uses it as you type. Until then the code has fk_your_access_key, which Formgong refuses.
5. Copy the code
Plain HTML with a short style block. The script at the end is optional: it keeps visitors on the page and says sent only when Formgong answers success: true. Delete it and the browser posts the form on its own.
<style>
#fg-form{position:relative;box-sizing:border-box;display:grid;gap:16px;width:100%;max-width:520px;padding:28px;border:1px solid #dbe2ea;border-radius:8px;background:#fff;color:#0f172a;font:16px/1.5 system-ui,sans-serif}
#fg-form *{box-sizing:border-box}
#fg-form h2{margin:0;font-size:24px;line-height:1.3}
#fg-form .fg-field{display:grid;gap:6px;min-width:0;margin:0;padding:0;border:0}
#fg-form label,#fg-form legend{font-weight:500}
#fg-form legend{padding:0;margin-bottom:2px}
#fg-form input,#fg-form select,#fg-form textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #64748b;border-radius:8px;background:#fff;color:inherit;font:inherit}
#fg-form textarea{min-height:120px;resize:vertical}
#fg-form .fg-choice{display:flex;align-items:center;gap:10px;font-weight:400}
#fg-form .fg-choice input{width:20px;min-height:20px;margin:0;flex-shrink:0}
#fg-form [aria-invalid=true]{border-color:#b91c1c}
#fg-form .fg-error{margin:0;color:#b91c1c;font-size:14px}
#fg-form .fg-status{margin:0}
#fg-form .fg-credit{margin:0;font-size:13px;text-align:center}
#fg-form .fg-credit a{color:#64748b}
#fg-form .fg-error:empty{display:none}
#fg-form button{min-height:48px;padding:12px 20px;border:0;border-radius:8px;background:#4338ca;color:#fff;font:inherit;font-weight:600;cursor:pointer}
#fg-form button:disabled{opacity:.7;cursor:wait}
#fg-form :focus-visible{outline:3px solid #4338ca;outline-offset:3px}
#fg-form .fg-trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
#fg-form select{appearance:none;-webkit-appearance:none;padding-inline-end:40px;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}#fg-form select:dir(rtl){background-position:15px 50%,20px 50%}@media (forced-colors:active){#fg-form select{appearance:auto;-webkit-appearance:auto;background-image:none}}
</style>
<form id="fg-form" action="https://formgong.com/submit" method="POST">
<h2>Rental application</h2>
<input type="hidden" name="access_key" value="fk_your_access_key">
<input type="hidden" name="_lang" value="en">
<div class="fg-field">
<label for="fg-full_name">Full name <span aria-hidden="true">*</span></label>
<input type="text" id="fg-full_name" name="full_name" autocomplete="name" required aria-describedby="fg-full_name-error">
<p class="fg-error" id="fg-full_name-error"></p>
</div>
<div class="fg-field">
<label for="fg-email">Email <span aria-hidden="true">*</span></label>
<input type="email" id="fg-email" name="email" autocomplete="email" required aria-describedby="fg-email-error">
<p class="fg-error" id="fg-email-error"></p>
</div>
<div class="fg-field">
<label for="fg-phone">Phone <span aria-hidden="true">*</span></label>
<input type="tel" id="fg-phone" name="phone" autocomplete="tel" required aria-describedby="fg-phone-error">
<p class="fg-error" id="fg-phone-error"></p>
</div>
<div class="fg-field">
<label for="fg-property">Which home are you applying for? <span aria-hidden="true">*</span></label>
<input type="text" id="fg-property" name="property" required aria-describedby="fg-property-error">
<p class="fg-error" id="fg-property-error"></p>
</div>
<div class="fg-field">
<label for="fg-move_in">Move-in date <span aria-hidden="true">*</span></label>
<input type="date" id="fg-move_in" name="move_in" required aria-describedby="fg-move_in-error">
<p class="fg-error" id="fg-move_in-error"></p>
</div>
<div class="fg-field">
<label for="fg-current_address">Current address <span aria-hidden="true">*</span></label>
<textarea id="fg-current_address" name="current_address" required aria-describedby="fg-current_address-error" rows="4"></textarea>
<p class="fg-error" id="fg-current_address-error"></p>
</div>
<div class="fg-field">
<label for="fg-time_at_address">How long have you lived there? <span aria-hidden="true">*</span></label>
<select id="fg-time_at_address" name="time_at_address" required aria-describedby="fg-time_at_address-error"><option value="">Choose…</option><option value="Less than a year">Less than a year</option><option value="1 to 2 years">1 to 2 years</option><option value="More than 2 years">More than 2 years</option></select>
<p class="fg-error" id="fg-time_at_address-error"></p>
</div>
<div class="fg-field">
<label for="fg-landlord">Current landlord's name and phone</label>
<input type="text" id="fg-landlord" name="landlord" aria-describedby="fg-landlord-error">
<p class="fg-error" id="fg-landlord-error"></p>
</div>
<div class="fg-field">
<label for="fg-employer">Employer or source of income <span aria-hidden="true">*</span></label>
<input type="text" id="fg-employer" name="employer" required aria-describedby="fg-employer-error">
<p class="fg-error" id="fg-employer-error"></p>
</div>
<div class="fg-field">
<label for="fg-monthly_income">Monthly income before tax</label>
<input type="number" id="fg-monthly_income" name="monthly_income" aria-describedby="fg-monthly_income-error">
<p class="fg-error" id="fg-monthly_income-error"></p>
</div>
<div class="fg-field">
<label for="fg-occupants">How many people will live there, including you? <span aria-hidden="true">*</span></label>
<input type="number" id="fg-occupants" name="occupants" required aria-describedby="fg-occupants-error">
<p class="fg-error" id="fg-occupants-error"></p>
</div>
<fieldset class="fg-field"><legend>Any pets? <span aria-hidden="true">*</span></legend>
<label class="fg-choice" for="fg-pets-0"><input id="fg-pets-0" type="radio" name="pets" value="No" required aria-describedby="fg-pets-error"> No</label>
<label class="fg-choice" for="fg-pets-1"><input id="fg-pets-1" type="radio" name="pets" value="Yes" required aria-describedby="fg-pets-error"> Yes</label>
<p class="fg-error" id="fg-pets-error"></p>
</fieldset>
<div class="fg-field">
<label for="fg-pet_details">If yes, what kind and how many</label>
<input type="text" id="fg-pet_details" name="pet_details" aria-describedby="fg-pet_details-error">
<p class="fg-error" id="fg-pet_details-error"></p>
</div>
<div class="fg-field">
<label for="fg-notes">Anything else we should know</label>
<textarea id="fg-notes" name="notes" aria-describedby="fg-notes-error" rows="4"></textarea>
<p class="fg-error" id="fg-notes-error"></p>
</div>
<div class="fg-field">
<label class="fg-choice" for="fg-consent"><input id="fg-consent" type="checkbox" name="consent" value="yes" required aria-describedby="fg-consent-error"> I agree that you may contact my current landlord and employer about this application <span aria-hidden="true">*</span></label>
<p class="fg-error" id="fg-consent-error"></p>
</div>
<div class="fg-trap" aria-hidden="true"><label>Leave this empty <input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label></div>
<button type="submit">Send application</button>
<p class="fg-status" data-fg-status role="status"></p>
<p class="fg-credit"><a href="https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=generator" target="_blank" rel="noopener">Form by Formgong</a></p>
</form>
<script>
// Optional. Without it the browser posts the form and Formgong shows its own thank-you or error page.
(function () {
var form = document.getElementById("fg-form");
var status = form.querySelector("[data-fg-status]");
form.noValidate = true;
form.addEventListener("submit", function (event) {
event.preventDefault();
var first = null, seen = {};
Array.prototype.forEach.call(form.elements, function (field) {
var id = field.getAttribute("aria-describedby");
if (!id || seen[id]) return;
seen[id] = true;
var ok = field.checkValidity();
field.setAttribute("aria-invalid", ok ? "false" : "true");
document.getElementById(id).textContent = ok ? "" : field.validationMessage;
if (!ok && !first) first = field;
});
if (first) { first.focus(); return; }
var button = form.querySelector("[type=submit]");
button.disabled = true;
status.textContent = "Sending…";
fetch(form.action, { method: "POST", headers: { Accept: "application/json" }, body: new FormData(form) })
.then(function (response) { return response.json().catch(function () { return {}; }); })
.then(function (data) {
if (data.success === true) { form.reset(); status.textContent = "Thank you. Your message was sent."; }
else status.textContent = data.message || "Could not send. Please try again.";
})
.catch(function () { status.textContent = "Could not reach the server. Check your connection and try again."; })
.then(function () { button.disabled = false; });
});
})();
</script>
<!-- Optional: fg.js counts views, starts and the field people stop at for your Formgong Analytics page. No cookies. Delete this line to turn it off. -->
<script src="https://formgong.com/fg.js" defer></script>The same form with Tailwind classes. Your site has to load Tailwind; this page does not.
<form class="relative mx-auto grid w-full max-w-lg gap-4 rounded-lg border border-slate-200 bg-white p-6 text-base text-slate-900" id="tw-form" action="https://formgong.com/submit" method="POST">
<h2 class="text-2xl font-semibold">Rental application</h2>
<input type="hidden" name="access_key" value="fk_your_access_key">
<input type="hidden" name="_lang" value="en">
<div class="grid gap-1.5">
<label class="font-medium" for="tw-full_name">Full name <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="text" id="tw-full_name" name="full_name" autocomplete="name" required aria-describedby="tw-full_name-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-full_name-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-email">Email <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="email" id="tw-email" name="email" autocomplete="email" required aria-describedby="tw-email-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-email-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-phone">Phone <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="tel" id="tw-phone" name="phone" autocomplete="tel" required aria-describedby="tw-phone-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-phone-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-property">Which home are you applying for? <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="text" id="tw-property" name="property" required aria-describedby="tw-property-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-property-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-move_in">Move-in date <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="date" id="tw-move_in" name="move_in" required aria-describedby="tw-move_in-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-move_in-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-current_address">Current address <span aria-hidden="true">*</span></label>
<textarea class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700 min-h-28" id="tw-current_address" name="current_address" required aria-describedby="tw-current_address-error" rows="4"></textarea>
<p class="text-sm text-red-700 empty:hidden" id="tw-current_address-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-time_at_address">How long have you lived there? <span aria-hidden="true">*</span></label>
<select class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" id="tw-time_at_address" name="time_at_address" required aria-describedby="tw-time_at_address-error"><option value="">Choose…</option><option value="Less than a year">Less than a year</option><option value="1 to 2 years">1 to 2 years</option><option value="More than 2 years">More than 2 years</option></select>
<p class="text-sm text-red-700 empty:hidden" id="tw-time_at_address-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-landlord">Current landlord's name and phone</label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="text" id="tw-landlord" name="landlord" aria-describedby="tw-landlord-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-landlord-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-employer">Employer or source of income <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="text" id="tw-employer" name="employer" required aria-describedby="tw-employer-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-employer-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-monthly_income">Monthly income before tax</label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="number" id="tw-monthly_income" name="monthly_income" aria-describedby="tw-monthly_income-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-monthly_income-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-occupants">How many people will live there, including you? <span aria-hidden="true">*</span></label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="number" id="tw-occupants" name="occupants" required aria-describedby="tw-occupants-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-occupants-error"></p>
</div>
<fieldset class="grid gap-2"><legend class="mb-1 font-medium">Any pets? <span aria-hidden="true">*</span></legend>
<label class="flex items-center gap-2" for="tw-pets-0"><input class="h-5 w-5" id="tw-pets-0" type="radio" name="pets" value="No" required aria-describedby="tw-pets-error"> No</label>
<label class="flex items-center gap-2" for="tw-pets-1"><input class="h-5 w-5" id="tw-pets-1" type="radio" name="pets" value="Yes" required aria-describedby="tw-pets-error"> Yes</label>
<p class="text-sm text-red-700 empty:hidden" id="tw-pets-error"></p>
</fieldset>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-pet_details">If yes, what kind and how many</label>
<input class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700" type="text" id="tw-pet_details" name="pet_details" aria-describedby="tw-pet_details-error">
<p class="text-sm text-red-700 empty:hidden" id="tw-pet_details-error"></p>
</div>
<div class="grid gap-1.5">
<label class="font-medium" for="tw-notes">Anything else we should know</label>
<textarea class="w-full rounded-md border border-slate-400 bg-white px-3 py-2 text-base text-slate-900 aria-[invalid=true]:border-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-700 min-h-28" id="tw-notes" name="notes" aria-describedby="tw-notes-error" rows="4"></textarea>
<p class="text-sm text-red-700 empty:hidden" id="tw-notes-error"></p>
</div>
<div class="grid gap-1.5">
<label class="flex items-center gap-2" for="tw-consent"><input class="h-5 w-5" id="tw-consent" type="checkbox" name="consent" value="yes" required aria-describedby="tw-consent-error"> I agree that you may contact my current landlord and employer about this application <span aria-hidden="true">*</span></label>
<p class="text-sm text-red-700 empty:hidden" id="tw-consent-error"></p>
</div>
<div class="absolute -left-[9999px] h-px w-px overflow-hidden" aria-hidden="true"><label>Leave this empty <input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label></div>
<button class="min-h-12 rounded-md bg-indigo-700 px-4 py-3 font-semibold text-white disabled:opacity-70" type="submit">Send application</button>
<p class="empty:hidden" data-fg-status role="status"></p>
<p class="text-center text-sm text-slate-500"><a href="https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=generator" target="_blank" rel="noopener">Form by Formgong</a></p>
</form>
<script>
// Optional. Without it the browser posts the form and Formgong shows its own thank-you or error page.
(function () {
var form = document.getElementById("tw-form");
var status = form.querySelector("[data-fg-status]");
form.noValidate = true;
form.addEventListener("submit", function (event) {
event.preventDefault();
var first = null, seen = {};
Array.prototype.forEach.call(form.elements, function (field) {
var id = field.getAttribute("aria-describedby");
if (!id || seen[id]) return;
seen[id] = true;
var ok = field.checkValidity();
field.setAttribute("aria-invalid", ok ? "false" : "true");
document.getElementById(id).textContent = ok ? "" : field.validationMessage;
if (!ok && !first) first = field;
});
if (first) { first.focus(); return; }
var button = form.querySelector("[type=submit]");
button.disabled = true;
status.textContent = "Sending…";
fetch(form.action, { method: "POST", headers: { Accept: "application/json" }, body: new FormData(form) })
.then(function (response) { return response.json().catch(function () { return {}; }); })
.then(function (data) {
if (data.success === true) { form.reset(); status.textContent = "Thank you. Your message was sent."; }
else status.textContent = data.message || "Could not send. Please try again.";
})
.catch(function () { status.textContent = "Could not reach the server. Check your connection and try again."; })
.then(function () { button.disabled = false; });
});
})();
</script>
<!-- Optional: fg.js counts views, starts and the field people stop at for your Formgong Analytics page. No cookies. Delete this line to turn it off. -->
<script src="https://formgong.com/fg.js" defer></script>The same form with Bootstrap 5 classes. Your site has to load Bootstrap; this page does not.
<form class="position-relative mx-auto" id="bs-form" action="https://formgong.com/submit" method="POST">
<h2 class="h4 mb-3">Rental application</h2>
<input type="hidden" name="access_key" value="fk_your_access_key">
<input type="hidden" name="_lang" value="en">
<div class="mb-3">
<label class="form-label" for="bs-full_name">Full name <span aria-hidden="true">*</span></label>
<input class="form-control" type="text" id="bs-full_name" name="full_name" autocomplete="name" required aria-describedby="bs-full_name-error">
<p class="form-text text-danger" id="bs-full_name-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-email">Email <span aria-hidden="true">*</span></label>
<input class="form-control" type="email" id="bs-email" name="email" autocomplete="email" required aria-describedby="bs-email-error">
<p class="form-text text-danger" id="bs-email-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-phone">Phone <span aria-hidden="true">*</span></label>
<input class="form-control" type="tel" id="bs-phone" name="phone" autocomplete="tel" required aria-describedby="bs-phone-error">
<p class="form-text text-danger" id="bs-phone-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-property">Which home are you applying for? <span aria-hidden="true">*</span></label>
<input class="form-control" type="text" id="bs-property" name="property" required aria-describedby="bs-property-error">
<p class="form-text text-danger" id="bs-property-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-move_in">Move-in date <span aria-hidden="true">*</span></label>
<input class="form-control" type="date" id="bs-move_in" name="move_in" required aria-describedby="bs-move_in-error">
<p class="form-text text-danger" id="bs-move_in-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-current_address">Current address <span aria-hidden="true">*</span></label>
<textarea class="form-control" id="bs-current_address" name="current_address" required aria-describedby="bs-current_address-error" rows="4"></textarea>
<p class="form-text text-danger" id="bs-current_address-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-time_at_address">How long have you lived there? <span aria-hidden="true">*</span></label>
<select class="form-select" id="bs-time_at_address" name="time_at_address" required aria-describedby="bs-time_at_address-error"><option value="">Choose…</option><option value="Less than a year">Less than a year</option><option value="1 to 2 years">1 to 2 years</option><option value="More than 2 years">More than 2 years</option></select>
<p class="form-text text-danger" id="bs-time_at_address-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-landlord">Current landlord's name and phone</label>
<input class="form-control" type="text" id="bs-landlord" name="landlord" aria-describedby="bs-landlord-error">
<p class="form-text text-danger" id="bs-landlord-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-employer">Employer or source of income <span aria-hidden="true">*</span></label>
<input class="form-control" type="text" id="bs-employer" name="employer" required aria-describedby="bs-employer-error">
<p class="form-text text-danger" id="bs-employer-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-monthly_income">Monthly income before tax</label>
<input class="form-control" type="number" id="bs-monthly_income" name="monthly_income" aria-describedby="bs-monthly_income-error">
<p class="form-text text-danger" id="bs-monthly_income-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-occupants">How many people will live there, including you? <span aria-hidden="true">*</span></label>
<input class="form-control" type="number" id="bs-occupants" name="occupants" required aria-describedby="bs-occupants-error">
<p class="form-text text-danger" id="bs-occupants-error"></p>
</div>
<fieldset class="mb-3"><legend class="form-label fs-6 mb-1">Any pets? <span aria-hidden="true">*</span></legend>
<div class="form-check"><input class="form-check-input" id="bs-pets-0" type="radio" name="pets" value="No" required aria-describedby="bs-pets-error"><label class="form-check-label" for="bs-pets-0">No</label></div>
<div class="form-check"><input class="form-check-input" id="bs-pets-1" type="radio" name="pets" value="Yes" required aria-describedby="bs-pets-error"><label class="form-check-label" for="bs-pets-1">Yes</label></div>
<p class="form-text text-danger" id="bs-pets-error"></p>
</fieldset>
<div class="mb-3">
<label class="form-label" for="bs-pet_details">If yes, what kind and how many</label>
<input class="form-control" type="text" id="bs-pet_details" name="pet_details" aria-describedby="bs-pet_details-error">
<p class="form-text text-danger" id="bs-pet_details-error"></p>
</div>
<div class="mb-3">
<label class="form-label" for="bs-notes">Anything else we should know</label>
<textarea class="form-control" id="bs-notes" name="notes" aria-describedby="bs-notes-error" rows="4"></textarea>
<p class="form-text text-danger" id="bs-notes-error"></p>
</div>
<div class="mb-3">
<div class="form-check"><input class="form-check-input" id="bs-consent" type="checkbox" name="consent" value="yes" required aria-describedby="bs-consent-error"><label class="form-check-label" for="bs-consent">I agree that you may contact my current landlord and employer about this application <span aria-hidden="true">*</span></label></div>
<p class="form-text text-danger" id="bs-consent-error"></p>
</div>
<div class="visually-hidden" aria-hidden="true"><label>Leave this empty <input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label></div>
<button class="btn btn-primary" type="submit">Send application</button>
<p class="mt-3 mb-0" data-fg-status role="status"></p>
<p class="text-center small text-secondary mt-2 mb-0"><a href="https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=generator" target="_blank" rel="noopener">Form by Formgong</a></p>
</form>
<script>
// Optional. Without it the browser posts the form and Formgong shows its own thank-you or error page.
(function () {
var form = document.getElementById("bs-form");
var status = form.querySelector("[data-fg-status]");
form.noValidate = true;
form.addEventListener("submit", function (event) {
event.preventDefault();
var first = null, seen = {};
Array.prototype.forEach.call(form.elements, function (field) {
var id = field.getAttribute("aria-describedby");
if (!id || seen[id]) return;
seen[id] = true;
var ok = field.checkValidity();
field.setAttribute("aria-invalid", ok ? "false" : "true");
document.getElementById(id).textContent = ok ? "" : field.validationMessage;
if (!ok && !first) first = field;
});
if (first) { first.focus(); return; }
var button = form.querySelector("[type=submit]");
button.disabled = true;
status.textContent = "Sending…";
fetch(form.action, { method: "POST", headers: { Accept: "application/json" }, body: new FormData(form) })
.then(function (response) { return response.json().catch(function () { return {}; }); })
.then(function (data) {
if (data.success === true) { form.reset(); status.textContent = "Thank you. Your message was sent."; }
else status.textContent = data.message || "Could not send. Please try again.";
})
.catch(function () { status.textContent = "Could not reach the server. Check your connection and try again."; })
.then(function () { button.disabled = false; });
});
})();
</script>
<!-- Optional: fg.js counts views, starts and the field people stop at for your Formgong Analytics page. No cookies. Delete this line to turn it off. -->
<script src="https://formgong.com/fg.js" defer></script>A component with its own styles. It checks every field, sends FormData, and says sent only when Formgong answers success: true.
import { useEffect, useState } from "react";
const ENDPOINT = "https://formgong.com/submit";
const CSS = "#fg-form{position:relative;box-sizing:border-box;display:grid;gap:16px;width:100%;max-width:520px;padding:28px;border:1px solid #dbe2ea;border-radius:8px;background:#fff;color:#0f172a;font:16px/1.5 system-ui,sans-serif}\n#fg-form *{box-sizing:border-box}\n#fg-form h2{margin:0;font-size:24px;line-height:1.3}\n#fg-form .fg-field{display:grid;gap:6px;min-width:0;margin:0;padding:0;border:0}\n#fg-form label,#fg-form legend{font-weight:500}\n#fg-form legend{padding:0;margin-bottom:2px}\n#fg-form input,#fg-form select,#fg-form textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #64748b;border-radius:8px;background:#fff;color:inherit;font:inherit}\n#fg-form textarea{min-height:120px;resize:vertical}\n#fg-form .fg-choice{display:flex;align-items:center;gap:10px;font-weight:400}\n#fg-form .fg-choice input{width:20px;min-height:20px;margin:0;flex-shrink:0}\n#fg-form [aria-invalid=true]{border-color:#b91c1c}\n#fg-form .fg-error{margin:0;color:#b91c1c;font-size:14px}\n#fg-form .fg-status{margin:0}\n#fg-form .fg-credit{margin:0;font-size:13px;text-align:center}\n#fg-form .fg-credit a{color:#64748b}\n#fg-form .fg-error:empty{display:none}\n#fg-form button{min-height:48px;padding:12px 20px;border:0;border-radius:8px;background:#4338ca;color:#fff;font:inherit;font-weight:600;cursor:pointer}\n#fg-form button:disabled{opacity:.7;cursor:wait}\n#fg-form :focus-visible{outline:3px solid #4338ca;outline-offset:3px}\n#fg-form .fg-trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}\n#fg-form select{appearance:none;-webkit-appearance:none;padding-inline-end:40px;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}#fg-form select:dir(rtl){background-position:15px 50%,20px 50%}@media (forced-colors:active){#fg-form select{appearance:auto;-webkit-appearance:auto;background-image:none}}";
export default function GeneratedForm() {
const [errors, setErrors] = useState({});
const [status, setStatus] = useState("");
const [busy, setBusy] = useState(false);
// Formgong analytics: form views, starts and the field people stop at. No cookies.
// Optional: fg.js counts views, starts and drop-off for your Formgong Analytics page. No cookies.
useEffect(() => { if (!document.querySelector('script[src$="/fg.js"]')) document.head.appendChild(Object.assign(document.createElement("script"), { src: "https://formgong.com/fg.js", defer: true })); }, []);
async function onSubmit(event) {
event.preventDefault();
const form = event.currentTarget;
const found = {};
for (const field of form.elements) {
if (field.name && !(field.name in found) && !field.checkValidity()) found[field.name] = field.validationMessage;
}
setErrors(found);
const first = Object.keys(found)[0];
if (first) { form.querySelector(`[name="${first}"]`).focus(); return; }
setBusy(true);
setStatus("Sending…");
try {
const response = await fetch(ENDPOINT, { method: "POST", headers: { Accept: "application/json" }, body: new FormData(form) });
const data = await response.json().catch(() => ({}));
if (data.success === true) {
form.reset();
setStatus("Thank you. Your message was sent.");
} else {
setStatus(data.message || "Could not send. Please try again.");
}
} catch {
setStatus("Could not reach the server. Check your connection and try again.");
} finally {
setBusy(false);
}
}
return (
<form id="fg-form" action={ENDPOINT} method="POST" onSubmit={onSubmit} noValidate aria-busy={busy}>
<style>{CSS}</style>
<h2>{"Rental application"}</h2>
<input type="hidden" name="access_key" value={"fk_your_access_key"} />
<input type="hidden" name="_lang" value={"en"} />
<div className="fg-field">
<label htmlFor="fg-full_name">{"Full name"}{" "}<span aria-hidden="true">*</span></label>
<input type="text" id="fg-full_name" name="full_name" autoComplete="name" required aria-describedby="fg-full_name-error" aria-invalid={errors.full_name ? "true" : undefined} />
<p className="fg-error" id="fg-full_name-error">{errors.full_name}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-email">{"Email"}{" "}<span aria-hidden="true">*</span></label>
<input type="email" id="fg-email" name="email" autoComplete="email" required aria-describedby="fg-email-error" aria-invalid={errors.email ? "true" : undefined} />
<p className="fg-error" id="fg-email-error">{errors.email}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-phone">{"Phone"}{" "}<span aria-hidden="true">*</span></label>
<input type="tel" id="fg-phone" name="phone" autoComplete="tel" required aria-describedby="fg-phone-error" aria-invalid={errors.phone ? "true" : undefined} />
<p className="fg-error" id="fg-phone-error">{errors.phone}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-property">{"Which home are you applying for?"}{" "}<span aria-hidden="true">*</span></label>
<input type="text" id="fg-property" name="property" required aria-describedby="fg-property-error" aria-invalid={errors.property ? "true" : undefined} />
<p className="fg-error" id="fg-property-error">{errors.property}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-move_in">{"Move-in date"}{" "}<span aria-hidden="true">*</span></label>
<input type="date" id="fg-move_in" name="move_in" required aria-describedby="fg-move_in-error" aria-invalid={errors.move_in ? "true" : undefined} />
<p className="fg-error" id="fg-move_in-error">{errors.move_in}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-current_address">{"Current address"}{" "}<span aria-hidden="true">*</span></label>
<textarea id="fg-current_address" name="current_address" required aria-describedby="fg-current_address-error" aria-invalid={errors.current_address ? "true" : undefined} rows={4} />
<p className="fg-error" id="fg-current_address-error">{errors.current_address}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-time_at_address">{"How long have you lived there?"}{" "}<span aria-hidden="true">*</span></label>
<select id="fg-time_at_address" name="time_at_address" required aria-describedby="fg-time_at_address-error" aria-invalid={errors.time_at_address ? "true" : undefined} defaultValue="">
<option value="">{"Choose…"}</option>
<option value={"Less than a year"}>{"Less than a year"}</option>
<option value={"1 to 2 years"}>{"1 to 2 years"}</option>
<option value={"More than 2 years"}>{"More than 2 years"}</option>
</select>
<p className="fg-error" id="fg-time_at_address-error">{errors.time_at_address}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-landlord">{"Current landlord's name and phone"}</label>
<input type="text" id="fg-landlord" name="landlord" aria-describedby="fg-landlord-error" aria-invalid={errors.landlord ? "true" : undefined} />
<p className="fg-error" id="fg-landlord-error">{errors.landlord}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-employer">{"Employer or source of income"}{" "}<span aria-hidden="true">*</span></label>
<input type="text" id="fg-employer" name="employer" required aria-describedby="fg-employer-error" aria-invalid={errors.employer ? "true" : undefined} />
<p className="fg-error" id="fg-employer-error">{errors.employer}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-monthly_income">{"Monthly income before tax"}</label>
<input type="number" id="fg-monthly_income" name="monthly_income" aria-describedby="fg-monthly_income-error" aria-invalid={errors.monthly_income ? "true" : undefined} />
<p className="fg-error" id="fg-monthly_income-error">{errors.monthly_income}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-occupants">{"How many people will live there, including you?"}{" "}<span aria-hidden="true">*</span></label>
<input type="number" id="fg-occupants" name="occupants" required aria-describedby="fg-occupants-error" aria-invalid={errors.occupants ? "true" : undefined} />
<p className="fg-error" id="fg-occupants-error">{errors.occupants}</p>
</div>
<fieldset className="fg-field"><legend>{"Any pets?"}{" "}<span aria-hidden="true">*</span></legend>
<label className="fg-choice" htmlFor="fg-pets-0"><input id="fg-pets-0" type="radio" name="pets" value={"No"} required aria-describedby="fg-pets-error" /> {"No"}</label>
<label className="fg-choice" htmlFor="fg-pets-1"><input id="fg-pets-1" type="radio" name="pets" value={"Yes"} required aria-describedby="fg-pets-error" /> {"Yes"}</label>
<p className="fg-error" id="fg-pets-error">{errors.pets}</p>
</fieldset>
<div className="fg-field">
<label htmlFor="fg-pet_details">{"If yes, what kind and how many"}</label>
<input type="text" id="fg-pet_details" name="pet_details" aria-describedby="fg-pet_details-error" aria-invalid={errors.pet_details ? "true" : undefined} />
<p className="fg-error" id="fg-pet_details-error">{errors.pet_details}</p>
</div>
<div className="fg-field">
<label htmlFor="fg-notes">{"Anything else we should know"}</label>
<textarea id="fg-notes" name="notes" aria-describedby="fg-notes-error" aria-invalid={errors.notes ? "true" : undefined} rows={4} />
<p className="fg-error" id="fg-notes-error">{errors.notes}</p>
</div>
<div className="fg-field">
<label className="fg-choice" htmlFor="fg-consent"><input id="fg-consent" type="checkbox" name="consent" value="yes" required aria-describedby="fg-consent-error" aria-invalid={errors.consent ? "true" : undefined} /> {"I agree that you may contact my current landlord and employer about this application"}{" "}<span aria-hidden="true">*</span></label>
<p className="fg-error" id="fg-consent-error">{errors.consent}</p>
</div>
<div className="fg-trap" aria-hidden="true"><label>Leave this empty <input type="text" name="botcheck" tabIndex={-1} autoComplete="off" /></label></div>
<button type="submit" disabled={busy}>{"Send application"}</button>
<p className="fg-status" role="status">{status}</p>
<p className="fg-credit"><a href={"https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=generator"} target="_blank" rel="noopener">{"Form by Formgong"}</a></p>
</form>
);
}
A single-file component that does the same as the React one.
<script setup>
import { onMounted, reactive, ref } from "vue";
const endpoint = "https://formgong.com/submit";
const errors = reactive({});
const status = ref("");
const busy = ref(false);
// Formgong analytics: form views, starts and the field people stop at. No cookies.
// Optional: fg.js counts views, starts and drop-off for your Formgong Analytics page. No cookies.
onMounted(() => { if (!document.querySelector('script[src$="/fg.js"]')) document.head.appendChild(Object.assign(document.createElement("script"), { src: "https://formgong.com/fg.js", defer: true })); });
async function onSubmit(event) {
const form = event.currentTarget;
for (const name of Object.keys(errors)) delete errors[name];
for (const field of form.elements) {
if (field.name && !(field.name in errors) && !field.checkValidity()) errors[field.name] = field.validationMessage;
}
const first = Object.keys(errors)[0];
if (first) { form.querySelector(`[name="${first}"]`).focus(); return; }
busy.value = true;
status.value = "Sending…";
try {
const response = await fetch(endpoint, { method: "POST", headers: { Accept: "application/json" }, body: new FormData(form) });
const data = await response.json().catch(() => ({}));
if (data.success === true) {
form.reset();
status.value = "Thank you. Your message was sent.";
} else {
status.value = data.message || "Could not send. Please try again.";
}
} catch {
status.value = "Could not reach the server. Check your connection and try again.";
} finally {
busy.value = false;
}
}
</script>
<template>
<form id="fg-form" :action="endpoint" method="POST" novalidate :aria-busy="busy" @submit.prevent="onSubmit">
<h2>Rental application</h2>
<input type="hidden" name="access_key" value="fk_your_access_key">
<input type="hidden" name="_lang" value="en">
<div class="fg-field">
<label for="fg-full_name">Full name <span aria-hidden="true">*</span></label>
<input type="text" id="fg-full_name" name="full_name" autocomplete="name" required aria-describedby="fg-full_name-error" :aria-invalid="errors.full_name ? 'true' : undefined">
<p class="fg-error" id="fg-full_name-error">{{ errors.full_name }}</p>
</div>
<div class="fg-field">
<label for="fg-email">Email <span aria-hidden="true">*</span></label>
<input type="email" id="fg-email" name="email" autocomplete="email" required aria-describedby="fg-email-error" :aria-invalid="errors.email ? 'true' : undefined">
<p class="fg-error" id="fg-email-error">{{ errors.email }}</p>
</div>
<div class="fg-field">
<label for="fg-phone">Phone <span aria-hidden="true">*</span></label>
<input type="tel" id="fg-phone" name="phone" autocomplete="tel" required aria-describedby="fg-phone-error" :aria-invalid="errors.phone ? 'true' : undefined">
<p class="fg-error" id="fg-phone-error">{{ errors.phone }}</p>
</div>
<div class="fg-field">
<label for="fg-property">Which home are you applying for? <span aria-hidden="true">*</span></label>
<input type="text" id="fg-property" name="property" required aria-describedby="fg-property-error" :aria-invalid="errors.property ? 'true' : undefined">
<p class="fg-error" id="fg-property-error">{{ errors.property }}</p>
</div>
<div class="fg-field">
<label for="fg-move_in">Move-in date <span aria-hidden="true">*</span></label>
<input type="date" id="fg-move_in" name="move_in" required aria-describedby="fg-move_in-error" :aria-invalid="errors.move_in ? 'true' : undefined">
<p class="fg-error" id="fg-move_in-error">{{ errors.move_in }}</p>
</div>
<div class="fg-field">
<label for="fg-current_address">Current address <span aria-hidden="true">*</span></label>
<textarea id="fg-current_address" name="current_address" required aria-describedby="fg-current_address-error" :aria-invalid="errors.current_address ? 'true' : undefined" rows="4"></textarea>
<p class="fg-error" id="fg-current_address-error">{{ errors.current_address }}</p>
</div>
<div class="fg-field">
<label for="fg-time_at_address">How long have you lived there? <span aria-hidden="true">*</span></label>
<select id="fg-time_at_address" name="time_at_address" required aria-describedby="fg-time_at_address-error" :aria-invalid="errors.time_at_address ? 'true' : undefined"><option value="">Choose…</option><option value="Less than a year">Less than a year</option><option value="1 to 2 years">1 to 2 years</option><option value="More than 2 years">More than 2 years</option></select>
<p class="fg-error" id="fg-time_at_address-error">{{ errors.time_at_address }}</p>
</div>
<div class="fg-field">
<label for="fg-landlord">Current landlord's name and phone</label>
<input type="text" id="fg-landlord" name="landlord" aria-describedby="fg-landlord-error" :aria-invalid="errors.landlord ? 'true' : undefined">
<p class="fg-error" id="fg-landlord-error">{{ errors.landlord }}</p>
</div>
<div class="fg-field">
<label for="fg-employer">Employer or source of income <span aria-hidden="true">*</span></label>
<input type="text" id="fg-employer" name="employer" required aria-describedby="fg-employer-error" :aria-invalid="errors.employer ? 'true' : undefined">
<p class="fg-error" id="fg-employer-error">{{ errors.employer }}</p>
</div>
<div class="fg-field">
<label for="fg-monthly_income">Monthly income before tax</label>
<input type="number" id="fg-monthly_income" name="monthly_income" aria-describedby="fg-monthly_income-error" :aria-invalid="errors.monthly_income ? 'true' : undefined">
<p class="fg-error" id="fg-monthly_income-error">{{ errors.monthly_income }}</p>
</div>
<div class="fg-field">
<label for="fg-occupants">How many people will live there, including you? <span aria-hidden="true">*</span></label>
<input type="number" id="fg-occupants" name="occupants" required aria-describedby="fg-occupants-error" :aria-invalid="errors.occupants ? 'true' : undefined">
<p class="fg-error" id="fg-occupants-error">{{ errors.occupants }}</p>
</div>
<fieldset class="fg-field"><legend>Any pets? <span aria-hidden="true">*</span></legend>
<label class="fg-choice" for="fg-pets-0"><input id="fg-pets-0" type="radio" name="pets" value="No" required aria-describedby="fg-pets-error"> No</label>
<label class="fg-choice" for="fg-pets-1"><input id="fg-pets-1" type="radio" name="pets" value="Yes" required aria-describedby="fg-pets-error"> Yes</label>
<p class="fg-error" id="fg-pets-error">{{ errors.pets }}</p>
</fieldset>
<div class="fg-field">
<label for="fg-pet_details">If yes, what kind and how many</label>
<input type="text" id="fg-pet_details" name="pet_details" aria-describedby="fg-pet_details-error" :aria-invalid="errors.pet_details ? 'true' : undefined">
<p class="fg-error" id="fg-pet_details-error">{{ errors.pet_details }}</p>
</div>
<div class="fg-field">
<label for="fg-notes">Anything else we should know</label>
<textarea id="fg-notes" name="notes" aria-describedby="fg-notes-error" :aria-invalid="errors.notes ? 'true' : undefined" rows="4"></textarea>
<p class="fg-error" id="fg-notes-error">{{ errors.notes }}</p>
</div>
<div class="fg-field">
<label class="fg-choice" for="fg-consent"><input id="fg-consent" type="checkbox" name="consent" value="yes" required aria-describedby="fg-consent-error" :aria-invalid="errors.consent ? 'true' : undefined"> I agree that you may contact my current landlord and employer about this application <span aria-hidden="true">*</span></label>
<p class="fg-error" id="fg-consent-error">{{ errors.consent }}</p>
</div>
<div class="fg-trap" aria-hidden="true"><label>Leave this empty <input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label></div>
<button type="submit" :disabled="busy">Send application</button>
<p class="fg-status" role="status">{{ status }}</p>
<p class="fg-credit"><a href="https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=generator" target="_blank" rel="noopener">Form by Formgong</a></p>
</form>
</template>
<style>
#fg-form{position:relative;box-sizing:border-box;display:grid;gap:16px;width:100%;max-width:520px;padding:28px;border:1px solid #dbe2ea;border-radius:8px;background:#fff;color:#0f172a;font:16px/1.5 system-ui,sans-serif}
#fg-form *{box-sizing:border-box}
#fg-form h2{margin:0;font-size:24px;line-height:1.3}
#fg-form .fg-field{display:grid;gap:6px;min-width:0;margin:0;padding:0;border:0}
#fg-form label,#fg-form legend{font-weight:500}
#fg-form legend{padding:0;margin-bottom:2px}
#fg-form input,#fg-form select,#fg-form textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #64748b;border-radius:8px;background:#fff;color:inherit;font:inherit}
#fg-form textarea{min-height:120px;resize:vertical}
#fg-form .fg-choice{display:flex;align-items:center;gap:10px;font-weight:400}
#fg-form .fg-choice input{width:20px;min-height:20px;margin:0;flex-shrink:0}
#fg-form [aria-invalid=true]{border-color:#b91c1c}
#fg-form .fg-error{margin:0;color:#b91c1c;font-size:14px}
#fg-form .fg-status{margin:0}
#fg-form .fg-credit{margin:0;font-size:13px;text-align:center}
#fg-form .fg-credit a{color:#64748b}
#fg-form .fg-error:empty{display:none}
#fg-form button{min-height:48px;padding:12px 20px;border:0;border-radius:8px;background:#4338ca;color:#fff;font:inherit;font-weight:600;cursor:pointer}
#fg-form button:disabled{opacity:.7;cursor:wait}
#fg-form :focus-visible{outline:3px solid #4338ca;outline-offset:3px}
#fg-form .fg-trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
#fg-form select{appearance:none;-webkit-appearance:none;padding-inline-end:40px;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}#fg-form select:dir(rtl){background-position:15px 50%,20px 50%}@media (forced-colors:active){#fg-form select{appearance:auto;-webkit-appearance:auto;background-image:none}}
</style>
Paste this into Lovable, Bolt, v0, Claude or Cursor. It asks for the same fields, names and checks, and tells the builder not to invent a backend.
Add a working form to my site. Match my site's existing design, but keep the field names, order and behaviour below exactly. Heading: "Rental application". Submit button: "Send application". Fields, in this order (the name attribute comes first): 1. full_name: label "Full name", short text, required; autocomplete="name" 2. email: label "Email", email address (type=email), required; autocomplete="email" 3. phone: label "Phone", phone number (type=tel), required; autocomplete="tel" 4. property: label "Which home are you applying for?", short text, required 5. move_in: label "Move-in date", date (type=date), required 6. current_address: label "Current address", long text (textarea), required 7. time_at_address: label "How long have you lived there?", dropdown (select), required; options: "Less than a year", "1 to 2 years", "More than 2 years" 8. landlord: label "Current landlord's name and phone", short text, optional 9. employer: label "Employer or source of income", short text, required 10. monthly_income: label "Monthly income before tax", number (type=number), optional 11. occupants: label "How many people will live there, including you?", number (type=number), required 12. pets: label "Any pets?", choose one (radio buttons in a fieldset with a legend), required; options: "No", "Yes" 13. pet_details: label "If yes, what kind and how many", short text, optional 14. notes: label "Anything else we should know", long text (textarea), optional 15. consent: label "I agree that you may contact my current landlord and employer about this application", single checkbox, value "yes", required Sending: - On submit, send the form with fetch as FormData (not JSON) to POST https://formgong.com/submit with the header Accept: application/json. - Include two hidden inputs: access_key = fk_your_access_key and _lang = en. - Load <script src="https://formgong.com/fg.js" defer></script> once on the page. It shows the owner form views, starts and the field visitors stop at, without cookies. - Add a spam trap: a text input named botcheck, inside a wrapper with aria-hidden="true" that is moved off-screen, with tabindex="-1" and autocomplete="off". Real visitors never see or fill it. - Show a success message only when the JSON answer has success === true, then reset the form. Otherwise show the answer's message field, or a short generic error. Disable the button while sending. - Required: directly under the submit button, add a small, muted link to Formgong, exactly <p class="fg-credit"><a href="https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=generator" target="_blank" rel="noopener">Form by Formgong</a></p>. Keep it visible on the page. Accessibility: - Every field has a visible label tied to it with for and id. Radio buttons and checkbox groups sit in a fieldset with a legend. - Each field has its own error line linked with aria-describedby. Before sending, check validity in the browser and write each invalid field's validationMessage into its error line, set aria-invalid, and focus the first invalid field. Do not create a backend, an API route, a database table, a server action or an account with another form service. Formgong stores the submission and emails it.
| Field | Type | Required |
|---|---|---|
| Name, email, phone | Text, email, phone | Yes |
| Home, move-in date | Text, date | Yes |
| Current address, how long | Text box, list | Yes |
| Current landlord | Text | No |
| Employer, monthly income | Text, number | Employer only |
| Occupants, pets | Number, two choices | Yes |
| Consent to contact references | Checkbox | Yes |
Taking rental applications without a website
Most small landlords have no website for their rentals, and they do not need one for this. Press “open this form in the form builder” above the code, change what you want, and enter your email at the end. You get your own copy of the form and the key that makes it deliver.
When Formgong asks where your site is built, pick “No website”. You get a link to a page that holds only your form. Send it to people after a viewing, add it to your listing, or reply with it when someone messages about the home. Each application arrives in your Formgong inbox and by email.
If you do have a site, copy the HTML tab instead. WordPress, Shopify, Wix and Webflow each get their own paste steps in the builder.
What the form leaves out on purpose
In the United States, the Fair Housing Act does not let a landlord choose tenants by race, color, religion, sex, national origin, disability or family status. The sample has no question about any of these. “How many people will live there” is about the size of the home, not about children. If you add questions, keep to the same rule.
The form also does not ask for a Social Security number, a date of birth or bank details. A credit or background check belongs in a tenant screening service, where the applicant gives that data and consent directly. An email inbox is the wrong place for it. Ask the applicants you want to move forward with to complete the screening there.
Comparing applications
Connect Google Sheets and every application becomes a row, with move-in dates and occupants side by side. Reply to the ones you want to meet. The others deserve a short answer too, and their email is right there.
Free limits, email and storage
The rental application form is free to copy or open in the builder. Applications are delivered only after you get your own key.
Copying the code needs no account. AI generations are limited to 5 an hour and 10 a day for each network, plus 100 a day for the whole site. When a limit is hit, start from a form and edit the fields. Editing runs in your browser and does not call the model.
On the free plan, Telegram is instant and email is sent for every submission. The free plan is 250 submissions a month. Auto-reply is not on the free plan. Submission data is stored in the EU. Support is Formgong at support@formgong.com.
Your description is sent to the model so it can choose fields. It is not stored. Do not paste passwords, card numbers or other secrets.
Questions
What should a rental application form include?
The applicant's name and contact details, the home and move-in date, current address and landlord, employer and income, the number of occupants, pets, and consent to contact references. The sample on this page has all of these.
Can I ask for a Social Security number in the form?
Do not collect it in an online form that lands in email. Use a tenant screening service for credit and background checks, so the applicant enters that data there.
How do I send a rental application without a website?
Open the form in the form builder, enter your email, and choose No website. You get a link to a page with only your application form. Send that link after a viewing or put it in your listing.
Which questions should a landlord not ask?
In the US, nothing about race, color, religion, sex, national origin, disability or family status. Local laws can add more, such as source of income. Check your city and state rules.
Can applicants pay an application fee through the form?
No. The form collects the application. If you charge a fee where that is allowed, take it through your screening service or a payment link.
Sources
Checked on 16.11.2026 against these public pages: Formgong form builder, Formgong HTML guide.