Bug #2562
closedEmbed Google Forms through Shortcode
Added by Jen Jack Gieseking over 11 years ago. Updated over 11 years ago.
0%
Description
I am updating the JustPublics@365 site and cannot insert an iFrame embed because it gets stripped out when I save. OpenCUNY recently had this issue. I am assigning this to Keith for now so that he could weigh in.
I believe the solution is that the iFrame shortcode plugin needs to be installed as a temporary plugin in order that iFrame
Files
Screen Shot 2013-05-29 at 5.25.23 PM.png (35.9 KB) Screen Shot 2013-05-29 at 5.25.23 PM.png | Matt Gold, 2013-05-29 05:25 PM | ||
Screen Shot 2013-05-29 at 5.25.30 PM.png (53.8 KB) Screen Shot 2013-05-29 at 5.25.30 PM.png | Matt Gold, 2013-05-29 05:25 PM | ||
2013-06-05 13-15-56.png (18.9 KB) 2013-06-05 13-15-56.png | Raymond Hoh, 2013-06-05 04:19 PM |
Updated by Matt Gold over 11 years ago
Hi Jack -- this is a feature, not a bug. iFrames present significant security risks and are thus disallowed on WP multisite installs by default. The stripping of iframes can be disabled, but I think it's a bad idea to enable that functionality.
Updated by Keith Miyake over 11 years ago
I think most embeddable content that you might use an iframe for should be able to be embedded without having to use iframes, like with a plugin/shortcode (e.g., google docs plugin, jetpack for multimedia, etc.). If you're trying to include something from an external site that gives you an "embed" code, post the embed code here (use the "pre" tag to wrap the code so it doesn't get mangled) and maybe we can figure out an alternative that doesn't rely on iframes.
Updated by Jen Jack Gieseking over 11 years ago
- Status changed from New to Resolved
It's a google form: will embed using gdoc plugin--thanks for jumping in and clarifying, both of you.
Updated by Matt Gold over 11 years ago
- Subject changed from iFrame embed stripped out to Embed Google Form
- Status changed from Resolved to Assigned
- Assignee changed from Keith Miyake to Boone Gorges
Hi Boone --
Jen Jack is trying to embed a google form on the JustPublics365 blog. Can you please let us know whether the embed shortcode you created for Google docs works for forms and if not, might it be possible to enable forms to be embedded through the shortcode, too?
Many thanks.
Best,
Matt
Updated by Matt Gold over 11 years ago
- Tracker changed from Bug to Feature
- Subject changed from Embed Google Form to Embed Google Forms through Shortcode
Updated by Boone Gorges over 11 years ago
- Assignee changed from Boone Gorges to Raymond Hoh
It was Ray who wrote that shortcode. Ray, does it support Forms? If so, what's the syntax?
Updated by Raymond Hoh over 11 years ago
Instructions to embed a Google Doc form are listed here:
https://github.com/cuny-academic-commons/google-docs-shortcode#embedding-a-form
Let me know if it isn't clear enough.
Updated by Matt Gold over 11 years ago
Jack - please give is a shot and let us know whether it works.
Scott -- can you please add this to our site documentation if it's not there already?
Ray -- did we already discuss packaging this as a plugin? If not, I think it's worth doing that; please let me know what you think.
Updated by Jen Jack Gieseking over 11 years ago
Hi Ray & co.,
To clarify, this issue is only happening when trying to embed a Google Form. It is fine with all other Google docs. If you try to embed a Google Form, as I did, you will see this issue as well.
Cheers, Jack
Updated by Raymond Hoh over 11 years ago
Hi Jack,
How are you getting the form URL and how does your shortcode look like?
This example works for me:
[gdoc link="https://docs.google.com/spreadsheet/viewform?formkey=dDZLLXBEUWhVRGNIS28tYlVGa21PT0E6MQ"]
Hi Matt,
The plugin is already in the wp.org repo:
https://wordpress.org/extend/plugins/google-docs-shortcode/
Updated by Boone Gorges over 11 years ago
- Status changed from Assigned to Reporter Feedback
- Target version set to Not tracked
Updated by Jen Jack Gieseking over 11 years ago
- Assignee changed from Raymond Hoh to Boone Gorges
Hi Boones and Ray & co.,
The shortcode works fine with spreadsheets and docs but my issue is specific to embedding a form. This shortcode does not work when I put it on a page:
[gdoc link="https://docs.google.com/forms/d/1OKLqWr998a7iXE8X_df0PWhR-3E7OhWeEwQhqINMObo/viewform" height="800"]
Thanks, Jack
Updated by Matt Gold over 11 years ago
Hi Ray -- I'm confirming that this isn't working for forms. See this page. Screenshots of dashboard and published views attached. Live page here - http://cunyitconference.commons.gc.cuny.edu/submit-a-proposal/
Updated by Matt Gold over 11 years ago
Updated by Raymond Hoh over 11 years ago
- Assignee changed from Boone Gorges to Raymond Hoh
Sorry guys, I didn't get an email notification about this.
I think Google Docs might have changed their form URLs, so I'll have to update the way I parse that information. Looking into it.
Updated by Raymond Hoh over 11 years ago
- Status changed from Reporter Feedback to Assigned
Updated by Matt Gold over 11 years ago
Great - thanks, Ray.
André, any idea why Ray didn't receive an email notification?
Updated by Raymond Hoh over 11 years ago
I was removed as the assignee in comment:15 and then didn't receive subsequent email updates.
So I reassigned myself just now and am now receiving emails for this issue again.
Updated by Matt Gold over 11 years ago
Aha! Got it. thanks. André, I'll take you off of the watch list.
Updated by Raymond Hoh over 11 years ago
- Status changed from Assigned to Resolved
Google Docs did update the Forms format. All newly-created Forms had a different form URL and this broke embedding for these new forms. Older forms continued to work.
Fortunately, this was an easy fix! Commit 0e7a984 should address this and will make its way into the next CAC release.
Updated by Matt Gold over 11 years ago
Awesome -- thanks, Ray! When the fix goes live, am I right to assume that everything should simply work without our having to change the embed code?
Updated by Raymond Hoh over 11 years ago
- Tracker changed from Support to Bug
When the fix goes live, am I right to assume that everything should simply work without our having to change the embed code?
That's right! Let me know if it works.
Updated by Matt Gold over 11 years ago
Hi Ray -- I'm still seeing the issue here -- http://cunyitconference.commons.gc.cuny.edu/submit-a-proposal/ . Any ideas?
And Jack, are you still experience an issue?
Updated by Raymond Hoh over 11 years ago
Thanks for the report, Matt.
I looked at your shortcode:
[gdoc link="https://docs.google.com/spreadsheet/embeddedform?formkey=dDZOTlhUbnBwSTdiOWtJS0c0by1EQ2c6MA"]
It should be:
[gdoc link="https://docs.google.com/spreadsheet/viewform?formkey=dDZOTlhUbnBwSTdiOWtJS0c0by1EQ2c6MA"]
Let me know if these instructions need amending:
https://github.com/cuny-academic-commons/google-docs-shortcode#embedding-a-form
Updated by Jen Jack Gieseking over 11 years ago
Thanks, Ray! This works beautifully for my form: http://justpublics365.commons.gc.cuny.edu/mediacamp-august/.
FYI: I used the following shortcode and it worked perfectly:
[gdoc link="https://docs.google.com/forms/d/1OKLqWr998a7iXE8X_df0PWhR-3E7OhWeEwQhqINMObo/edit"]
Updated by Matt Gold over 11 years ago
Ray, that code didn't work for me. Jack, where/how did you find that link code on the form?
Updated by Jen Jack Gieseking over 11 years ago
Matt, I grabbed the code from the browser so the form I was working on is located at:
https://docs.google.com/forms/d/1OKLqWr998a7iXE8X_df0PWhR-3E7OhWeEwQhqINMObo/edit.
I believe the "spreadsheet" code you are loading may be the data from the form instead of the form itself. Possible?
Updated by Matt Gold over 11 years ago
Okay, so there are two things that I don't understand here:
1. Ray, why is Jack's shortcode working when it doesn't seem to match the setup that you put together?
2. Why is my own attempt to match Jack's code - [gdoc link="https://docs.google.com/forms/d/dDZOTlhUbnBwSTdiOWtJS0c0by1EQ2c6MA"] - not working? I'm getting the form code from the public URL of the form, as Jack did - https://docs.google.com/spreadsheet/viewform?fromEmail=true&formkey=dDZOTlhUbnBwSTdiOWtJS0c0by1EQ2c6MA
Thanks for your help.
Updated by Raymond Hoh over 11 years ago
- File 2013-06-05 13-15-56.png 2013-06-05 13-15-56.png added
Jack's code is different because that form is based off a newer iteration of Google Docs Forms. Your form is based off an older version of Google Docs Forms. My shortcode plugin should support both.
Can I ask if you checked out these instructions and if they are clear enough?
https://github.com/cuny-academic-commons/google-docs-shortcode#embedding-a-form
About why your shortcode is not working, maybe Google Docs Shortcode is not enabled on your subsite? Can you double-check? I tested your shortcode and it works on my site. I've attached a screenshot.
Updated by Matt Gold over 11 years ago
Aha -- I thought the shortcode was activated automatically, so I never enabled it. Everything is working now, and the directions are clear. Many thanks.