Submit HTML form to Google Form

On This Page

Here, we’ll explore how to create a simple HTML form and submit its data to Google Sheets using Google Forms. This may be helpfull to get submission in a static site. This page also you will find a form where you can drop something :) go.

Create a Google Form:

Go to Google Forms and create a new form. Add the necessary fields (e.g., name, email) to your form.

Google for test form creat

Send this google form via link and copy that link.

Google form share link page

Get HTML Form

Create an HTML form that will send data to our Google Form.

By Inspecting form page

<form action="YOUR_GOOGLE_FORM_URL" method="POST">
  <label for="name">Name:</label><br>
  <input type="text" id="name" name="entry.1234567890" required><br><br>
  
  <label for="email">Email:</label><br>
  <input type="email" id="email" name="entry.0987654321" required><br><br>
   
  <button type="submit">Submit</button>
</form>

Get https://docs.google.com/forms/u/0/d/e/1FAIpQLSeXElMhFkfRfFOMJIQgUJa0mi9lrNUExF04AN4BNsI3AsTpRw/formResponse

and add name attribute values which you can get from FB_PUBLIC_LOAD_DATA by inspecting the page

get response url rfom inspecting the page

<form action="https://docs.google.com/forms/u/0/d/e/1FAIpQLSeXElMhFkfRfFOMJIQgUJa0mi9lrNUExF04AN4BNsI3AsTpRw/formResponse" method="POST">
  <label for="name">Name:</label><br>
  <input type="text" id="name" name="entry.2024848077" required><br><br>
  
  <label for="email">Email:</label><br>
  <input type="email" id="email" name="entry.1580993660" required><br><br>
   
  <button type="submit">Submit</button>
</form>

There is a existing site that does this in snap.

Using Google Forms HTML Exporter

Go to Google Forms HTML Exporter and paste the link you copied. Get the html you get html code of the form and output , you can fill the form here to check form is working.

snap from Google Forms HTML Exporter get the html

Google Form responses

Open google form response tab to see responses submited.

Google form responses page

Google Sheet responses

Now you can creat a Google Sheet

google sheet creat from google form

Now when new submission will be done this sheet will be automatically updated.

google sheet of responses

You have now successfully set up an HTML form that submits data to Google Sheets via Google Forms. This method is straightforward and integrates with Google’s ecosystem, offering a convenient way to manage and analyze form submissions.

Drop Your Email

Comments

Add a Comment