Quick survey on what’s coming:
To My surprise, the other day I’ve realized that the contact form of My website does not work properly. Interestingly, it still gives a positive confirmation message once You click “Submit” button - which, however, turns out to be false, because there is no message delivered. The same with all the rest of My websites where I use the contact form gadget.
After a little bit of research I’ve learned that those issues exist at least for couple weeks now, and Google probably is aware of that, working on the fix.
In these circumstances I was pretty sure that I Myself can’t do anything about it, i.e. it’s beyond My competence. But then another surprise has come, this time a positive one: I’ve discovered much better solution. A funny thing is that without this failure there are pretty low chances for Me to stumble upon this interesting alternative - so... I’m grateful :) .
It has several edges over classic contact form gadget - the following ones I find most important:
All of that is possible thanks to Google Forms, which are part of G Suit (Google’s complete office suite). With the help of Google Forms You can not only create a better contact form, but also forms serving for various different purposes (there are several examples already in place for You to inspect). Moreover, You can create those forms totally from scratch, if You like, caring about every little detail (there are many possibilities here - for example You can choose which fields should be required, or You can apply a validation mechanism checking if an e-mail or a website address have been entered correctly).
So far I haven’t found much of them:
There are two different ways of applying Google Forms on Your website. One is simpler, while the other gives You more flexibility.
In the first scenario You create a form completely within Google Forms dashboard. Once You’ve finished, You can grab a short code snippet to easy embed (copy&paste) on Your website (within the HTML/JavaScript gadget or directly within the template).
In the second scenario You create a basic form within the dashboard (just the fields You want to include - no additional features (like validation) or customization needed). Meanwhile You create a similar form within Your HTML/JavaScript gadget or the HTML template itself. Both forms should have the same fields. Then, using “Inspect” function within Your Chrome(-based) browser, You easily grab some code snippets from the form created within Google Forms - and paste them into the proper place within its HTML-based counterpart.
Both scenarios give You some room for customization, but in case of Google Forms dashboard the possibilities are pretty limited. Besides, it’s worth to remember that an embedded form (the first option) will be presented with accompanying “Google fine print” (like “Never submit passwords through Google Forms” or “This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy”).
and also Google “landing page” displayed once the form has been submitted.
The second scenario, although requiring more work, allows You to make the outsourced nature of a form completely transparent, i.e. it can not only look exactly like You prefer (landing page included!), but has no signs of Google brand behind it (which You may find beneficial, regarding Your brand’s coherence).
Since there are already great how-to’s on the matter (I mean this and that one), I’m not gonna to repeat them because it’s pretty simple:
<form>
header with action
value to copy and paste into Your HTML form.name
attribute’s value) - to also include within Your HTML form.Once again, for more detailed step-by-step instruction I recommend You to use this and that one.
Code-wise, the head of Your HTML form may look like this:
<form action="PasteTheProperActionValue" method="POST">
If You’d like to have Your Own landing page to display once someone has filled and sent the form, it will be enough just to replace the head line mentioned above with this:
<script type="text/javascript">var submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe" style="display:none;" onload="if(submitted) {window.location='YourLandingPageAddressHere.html';}"></iframe>
<form action="PasteTheProperActionValue" method="POST" target="hidden_iframe" onsubmit="submitted=true;">
If You would like to create similar independent forms to put on other websites, the easiest way may be as follows:
action
value - as long as You only need the same fields as before, You don’t need to gain their name
values again, because they remain the same.
No comments:
Post a Comment