Here's what worked for me:
- Create your custom form
- Create your Google form and view the source after clicking view live form
- Copy the html code starting from
- Each of the input fields in the Google form have name and id attributes which need to be copied to your personal form
- Use the URL in the form action of Google forms in your form.
- Make sure that even the submit button has the ID and name attributes matching with the Google form source.
- If you make a submit now, it will take you to the Google form response page. You can avoid this by making an ajax form submit.
If your custom form does not validate a Google form mandatory element, then you will again be redirected to the Google form page.