Embedding a google form

  • Unknown's avatar

    I have followed the wp instructions for embedding a Google FORM. Here’s what I have inserted into the html section:
    https://docs.google.com/forms/u/0/d/e/1FAIpQLSe9M_z55Ll64mRbZky86e_eQr6hnCfJMvB65FfAYxxbkY0yZw/viewform?embedded=true
    The form shows correctly when you view it through the visual tab but when you preview or update the page it only shows the ugly link. I have tried clearing the cache and viewing the website on a different device but the form isn’t showing; just the link.

    How can I get the form to show correctly?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    There seems to be something about your form that’s making it not embed properly. I can use the code you have and replace it with one of my own forms and it works fine, but I can’t seem to find what’s different about your form that might be causing it, except possibly the Captcha. If you have any plugins or custom code in the form you might try disabling/deleting those and see if it fixes it.

  • Unknown's avatar

    There’s some conflicting information in the support docs.

    * This page says that you should use the embed code including the iframe tags:
    https://en.support.wordpress.com/google-docs/

    * Meanwhile this page says that you cannot use iframes to embed pages or embed pages using JavaScript in WordPress for security reasons:
    https://en.support.wordpress.com/troubleshooting-embed-links-and-shortcodes/

    Your form seems to work just fine viewed directly or embedded into a blank html document so I second the idea that it’s the Captcha or some other plugin/custom code causing the issue.
    There are a couple of things you could do. You could make a new form that doesn’t have Captcha and then embed that into the “Register for 2017” page. Alternatively you could change the “Register for 2017” menu link so that it is a direct link to your form.

  • Unknown's avatar

    Thanks :-) I have removed the captcha, and remade the form without captcha but there is no change.

    I can still see the correct form in the visuals tab but it is only showing as a link when published. I have also checked to make sure there is no hyperlink attached.

    Interesting about the conflicting information over wp supporting iframe. It seems to have at least some ability to support iframes. Is there any other way besides iframe?

    I like your idea of changing the menu link so that it is a direct link to the form but wp doesn’t appear to offer me that option. (I can add title attribute, css classes, link relationships or a description. no option for url)

  • Unknown's avatar

    I think what @lastfarthing was saying was make that a link to your form instead of trying to embed it. The HTML would be Register for 2017 . Or you could just click the Insert/Edit Link button on the visual editor. It’s not the embedded form, but at least it will work.

  • Unknown's avatar

    Sorry, the HTML code would look like this:

    <a href="https://docs.google.com/forms/u/0/d/e/1FAIpQLSe9M_z55Ll64mRbZky86e_eQr6hnCfJMvB65FfAYxxbkY0yZw/viewform">Register for 2017</a>

  • Unknown's avatar

    I like your idea of changing the menu link so that it is a direct link to the form but wp doesn’t appear to offer me that option. (I can add title attribute, css classes, link relationships or a description. no option for url)

    There’s a url field if you create custom menu links.

    Screenshot – https://cloudup.com/cus2KOZF3Qw

  • Unknown's avatar

    Ok, I just recreated this with my own form which does not have a captcha and I think this will work for you.

    * Click on the Register for 2017 menu item.
    * Scroll down to the link to your form.
    * Click on that link and go directly to the form.
    * Copy the link address from the address bar.
    * Now go back and edit your embed code like so:
    iframe src=” copy new url here

    There’s a slight difference in the url in the embed code that breaks the embed function in WordPress, but this workaround should get the form on the page for you.

    This may or may not work with your original form that had the captcha. I haven’t tested that. If it doesn’t and you would like to link directly to your form with the captcha instead try this:

    * Click on Customize Theme
    * Click on Menus
    * Click on Primary (or whichever is your top menu)
    * Click on + Add Items
    * Click on Custom Links

    Once you’ve gotten that far you should be able to enter the url of your form where it asks for URL and then Register for 2017 in the “Link Text” box.

  • Unknown's avatar

    Thank you @Garysixtyeight and and @lastfarthing

    I’ve used the url field in custom menu links to create a new menu item that goes directly to the form. I wouldn’t have worked it out without your screenshot!

    Thank you so much! It looks a lot more professional now

  • Unknown's avatar
  • Unknown's avatar

    You’re welcome @thegreatnorthernsciencefair. Your blog looks great!

    Good call on the screenshot @garysixtyeight.

  • The topic ‘Embedding a google form’ is closed to new replies.