Customizing Google Forms is important for someone who trusts Google but doesn’t like their branding at the bottom of the forms. Google offers two ways of using their form. One is embedding the form on our website and the second one is redirecting users to the form page.
- Create a Google form
- Customize Google Form
- Create a similar form
- Change Action and Name values
- Multiple Choice, Options, selects radio inputs
- Publish it on any website
- Get responses in a Google SpreadSheet
- Google Form Redirection
- Google Form Notification
- Check if the Google Form is working
- Improvements like File Uploads
Both the methods are not that great because you have to choose the template Google provides you and you have to bear the Google branding at the bottom.
This is what I’m talking about. Many of us may not bother about the branding. A real headache is when you embed the form on your website, it may display its own scrollbar and may look totally different from your website’s color scheme.
One of my clients asked me whether it is possible to insert google form in their contact page without the google branding on it. I said it isn’t possible. At that time I did not know that we can not only hide the branding, we can completely transform the Google form.
Create a Google form
Go to Google Forms and create a form with values Name and Email. I’m keeping it simple for this tutorial. The next part is to customize Google form.
Customize Google Form
We are going to scrape this Google form for certain values and implement it in our own form. So the first step is to create a form.
You can have any field in the contact form but I will be using only name and email. Once you create the form, click on Send and it will show you how you can implement the form.
Get the form link and open it in a new tab. It is easier if you’re using a Chrome browser. Now, inspect(f12) each and every field in the form and find name attribute. Copy whatever the value present in it. It will be like
<form> tag and copy the URL found in action attribute.
Create a similar form
Create your own barebone form with the same fields as in the Google form. For this example, a sample form will look like this.
Change Action and Name values
Now in your barebone form, change the action to whatever the action you find in the Google form inspection. It will look something like this
Copy this value and paste it in your form’s action. Also, copy respective name values and put it in appropriate fields. The completed form should look like this.
Multiple Choice, Options, selects radio inputs
For form elements like options and select, the google form will have a hidden
<input> tag at the end of the form. Sometimes you will have to select an option in the form to see that hidden
<input> tag. Copy the name value from that tag to all the options and selects.
Publish it on any website
The good thing about the form is that it not only works but it works on static websites as well. This is a great way to insert Google forms in Jekyll websites and blogs hosted on Github Pages.
Try not to spam.
Here is a working form that you can check. I have restricted the entries to 18 characters so as to avoid long spams.
Style this form however you want to but I’m keeping it simple without any styles applied. You can check the entries here.
Get responses in a Google SpreadSheet
This is a cool feature where you can get the entries in a spreadsheet! In the form, click on Responses tab. You should be able to see all the responses right there. But you will see a spreadsheet icon at the top right corner. Click on it and it will ask you whether you’d like to save responses in a new spreadsheet. Click Create
Once you create it, you should see a spreadsheet created with tabs for Name and Email.
Google Form Redirection
After form submission, you will be redirected to a Google page where it says response is received. You can edit the message and provide a link back to the website. This custom message and link will be shown to the users after they submit the form.
But if you don’t want to redirect the users to a custom URL, then use the code below and change the parameters wherever it is necessary.
Google Form Notification
Another cool feature is to get notifications to your email upon every entry. You can activate this feature in the spreadsheet by going to Tools » Notification Rules…. Set rules on when to receive notifications and you’re good to go.
Check if the Google Form is working
Check if the responses are recorded in the form response or the spreadsheet. After the submission, if the form redirects you to the Google Form for missing entries, then check if the
name values are entered properly.
Improvements like File Uploads
Google Forms now has file upload option in their native forms. I’m trying to implement it to a custom form but so far no luck. It is very complicated. There are methods to do it using app scripts which you can look out for.
Though there are other free services like Formspree, SimpleForm etc, I trust Google with my data. This is because I’m aware that Google uses it for targeting ads. But I don’t know what other services use the data for. While using SimpleForm, I used to get a lot of spam from digital marketers. Obviously, the guy who owns SimpleForm is selling the email addresses to someone.
I don’t mind it because I’m using the service for free. But I’m concerned about the entries by my users. I’m pretty sure that their emails will also be collected and sold. I don’t want my users’ inboxes to be cluttered with spam. At least with Google Forms, I did not face that issue.
Try this and let me know - in the comment section - if it has worked for you. Any suggestions to improve the article is appreciated.