Search code examples
htmlgithubmarkdowngithub-pagesgoogle-forms

Make contact form using Google Forms inside GitHub Page


I use github for hosting my website. I wish to include the possibility for the users to subscribe to a newsletter, which they should do adding their email to a submission form.

I thought that google forms could be a good option to collect the emails, as it is for free, but I don't know how to include it on the github page.

The form I created is this one. I would like to add a button inside this markdown file to access the form and subscribe, but I'm not familiar with HTML.

Can you help me?


Solution

  • Google Forms automatically generates HTML code for you to embed the form.

    Open the form in Google Drive, then in the top right corner click Send. In the popup, there should be a <> tab. Click on it and it gives you HTML code that looks like

    <iframe src="https://docs.google.com/forms/...your_form_url.../viewform?embedded=true" width="640" height="382" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>
    

    You should be able to use that to get the form into your page.