Free tool

Survey form generator

Formgong team ·

The sample is a short survey: who the person is, how they found you, what they use it for, a 1 to 5 score and one open question. Change the questions, then copy the code.

Short answer: A survey form generator writes the questions as form fields you can paste into a page. This sample uses radio buttons for single answers, a checkbox group for several, a 1 to 5 scale and an optional open question. Each response arrives as one submission. It does not chart the answers for you.

Survey form you can copy

Describe your own survey in a sentence, or edit the questions one by one in the field editor. The HTML tab is selected. Tailwind, Bootstrap 5, React and Vue hold the same questions. 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

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.

A two-minute survey

Which describes you best? 

What do you use it for?

How satisfied are you overall? (1 = not at all, 5 = very) 

Form by Formgong

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.

We email you a sign-in code. Your first form and its key are ready once you enter it. Enter the code in this tab and the form's Connect page starts with these fields.

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.

HTML
<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>A two-minute survey</h2>
  <input type="hidden" name="access_key" value="fk_your_access_key">
  <input type="hidden" name="_lang" value="en">
  <fieldset class="fg-field"><legend>Which describes you best? <span aria-hidden="true">*</span></legend>
    <label class="fg-choice" for="fg-role-0"><input id="fg-role-0" type="radio" name="role" value="Customer" required aria-describedby="fg-role-error"> Customer</label>
    <label class="fg-choice" for="fg-role-1"><input id="fg-role-1" type="radio" name="role" value="Trying it out" required aria-describedby="fg-role-error"> Trying it out</label>
    <label class="fg-choice" for="fg-role-2"><input id="fg-role-2" type="radio" name="role" value="Just looking" required aria-describedby="fg-role-error"> Just looking</label>
    <p class="fg-error" id="fg-role-error"></p>
  </fieldset>
  <div class="fg-field">
    <label for="fg-source">How did you hear about us? <span aria-hidden="true">*</span></label>
    <select id="fg-source" name="source" required aria-describedby="fg-source-error"><option value="">Choose…</option><option value="Search">Search</option><option value="A friend">A friend</option><option value="Social media">Social media</option><option value="Something else">Something else</option></select>
    <p class="fg-error" id="fg-source-error"></p>
  </div>
  <fieldset class="fg-field"><legend>What do you use it for?</legend>
    <label class="fg-choice" for="fg-uses-0"><input id="fg-uses-0" type="checkbox" name="uses" value="Work" aria-describedby="fg-uses-error"> Work</label>
    <label class="fg-choice" for="fg-uses-1"><input id="fg-uses-1" type="checkbox" name="uses" value="Personal projects" aria-describedby="fg-uses-error"> Personal projects</label>
    <label class="fg-choice" for="fg-uses-2"><input id="fg-uses-2" type="checkbox" name="uses" value="A client&#39;s site" aria-describedby="fg-uses-error"> A client&#39;s site</label>
    <label class="fg-choice" for="fg-uses-3"><input id="fg-uses-3" type="checkbox" name="uses" value="School" aria-describedby="fg-uses-error"> School</label>
    <p class="fg-error" id="fg-uses-error"></p>
  </fieldset>
  <fieldset class="fg-field"><legend>How satisfied are you overall? (1 = not at all, 5 = very) <span aria-hidden="true">*</span></legend>
    <label class="fg-choice" for="fg-satisfaction-0"><input id="fg-satisfaction-0" type="radio" name="satisfaction" value="1" required aria-describedby="fg-satisfaction-error"> 1</label>
    <label class="fg-choice" for="fg-satisfaction-1"><input id="fg-satisfaction-1" type="radio" name="satisfaction" value="2" required aria-describedby="fg-satisfaction-error"> 2</label>
    <label class="fg-choice" for="fg-satisfaction-2"><input id="fg-satisfaction-2" type="radio" name="satisfaction" value="3" required aria-describedby="fg-satisfaction-error"> 3</label>
    <label class="fg-choice" for="fg-satisfaction-3"><input id="fg-satisfaction-3" type="radio" name="satisfaction" value="4" required aria-describedby="fg-satisfaction-error"> 4</label>
    <label class="fg-choice" for="fg-satisfaction-4"><input id="fg-satisfaction-4" type="radio" name="satisfaction" value="5" required aria-describedby="fg-satisfaction-error"> 5</label>
    <p class="fg-error" id="fg-satisfaction-error"></p>
  </fieldset>
  <div class="fg-field">
    <label for="fg-change">What is one thing we should change?</label>
    <textarea id="fg-change" name="change" aria-describedby="fg-change-error" rows="4"></textarea>
    <p class="fg-error" id="fg-change-error"></p>
  </div>
  <div class="fg-field">
    <label for="fg-email">Email, only if you want a reply</label>
    <input type="email" id="fg-email" name="email" autocomplete="email" aria-describedby="fg-email-error">
    <p class="fg-error" id="fg-email-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 answers</button>
  <p class="fg-status" data-fg-status role="status"></p>
  <p class="fg-credit"><a href="https://formgong.com/en/?ref=badge&amp;utm_source=badge&amp;utm_medium=form&amp;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>
Field types in the survey sample
Question typeHTML in the copyUse it for
One answerRadio buttons in a fieldsetWho someone is, a 1 to 5 score, yes or no
Several answersCheckboxes in a fieldset, one nameWhat they use, which features they want
Long listA select with an empty first optionFive or more options, such as a source
Open answerA textareaWhat to change, anything else

How the survey questions are written in HTML

  • One answer. Radio buttons that share a name, inside a fieldset whose legend is the question. Screen readers read the question before each option. When the question is required, every radio carries required, and the browser asks for one of them.
  • Several answers. A checkbox group, also in a fieldset. Every ticked box is sent under the one name. The group is never marked required, because in plain HTML that would force people to tick every box.
  • A scale. The 1 to 5 question is five radio buttons. Put the meaning of the ends in the label, as the sample does, or people will guess which end is good.
  • A long list. A select with an empty first option, so a required list makes people choose instead of sending the first item.
  • Open questions. A textarea, optional in the sample. Required open questions are where people give up.

Writing questions people answer honestly

Ask one thing per question. “Was the site fast and easy to use?” is two questions, and the answer tells you neither. Give a “Something else” option when your list may not cover everyone, so people do not pick the nearest wrong answer. Keep the wording neutral: “How satisfied are you?” rather than “How much did you enjoy it?”.

Put the easy questions first and the open one last. Ask for an email only if you will write back, and leave it optional. Without it, the answers carry no name or address unless the person types one.

Pew Research Center’s guide to writing survey questions, linked in the sources, covers question order and wording in more depth.

Where the answers go

After you add your key, each response is stored in your Formgong inbox and sent to you by email or Telegram. A checkbox group arrives as one field with every ticked option.

To count answers, connect Google Sheets. It adds one row per response, and a pivot table or COUNTIF gives you the totals. If you need branching, where question 3 depends on the answer to question 2, a survey tool is the better fit. This page writes a single-page form.

Free limits, email and storage

The survey code is free to copy. Responses are delivered only after you replace the placeholder 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 is a survey form generator?

A tool that turns your questions into form fields you can put on a website. This one writes HTML, Tailwind, Bootstrap 5, React and Vue versions of the same survey.

How do I make a survey form in HTML?

Use radio buttons for one answer, checkboxes for several and a textarea for open answers. Group each question in a fieldset with a legend. Copy the HTML tab on this page for a working example.

Can the survey be anonymous?

Make the email field optional, or delete it. Then a response carries no name or address unless the person types one into an answer.

Can I see the results as a chart?

This page does not draw charts. Connect Google Sheets to get one row per response, then chart or count them there.

Can the survey skip questions based on an answer?

No. The form is one page with every question shown. Use a survey tool if you need branching logic.

Sources

Checked on 16.10.2026 against these public pages: Pew Research Center: Writing survey questions, W3C WAI: Grouping controls, MDN: input type=radio, MDN: input type=checkbox.

← Formgong