# How to embed a Google Form?

**URL:** https://meta.discourse.org/t/how-to-embed-a-google-form/84888
**Category:** Support
**Created:** [9 april 2018 om 16:01 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888 "2018-04-09T16:01:37Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Tyson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tyson/32/86155_2.png) [@Tyson](https://meta.discourse.org/u/Tyson)
#### Post date: [9 april 2018 om 16:01 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/1 "2018-04-09T16:01:38Z")

</div>

I’ve been trying without success to embed a Google Form. The embed code provided by Google Forms is an iframe. Is this compatible with Discourse?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [9 april 2018 om 16:43 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/2 "2018-04-09T16:43:30Z")

</div>

It is - you’ll have to allow the `https://docs.google.com` as the source domain prefix in allowed iframes.

Search for _iframe_ in your Discourse settings.

---

<div class="post-metadata">

### Author: ![Tyson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tyson/32/86155_2.png) [@Tyson](https://meta.discourse.org/u/Tyson)
#### Post date: [9 april 2018 om 16:55 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/3 "2018-04-09T16:55:54Z")

</div>

> [@omarfilip](#):
>
> [https://docs.google.com](https://docs.google.com)

Works great. Thanks.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [9 april 2018 om 20:10 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/4 "2018-04-09T20:10:09Z")

</div>

Good to know. What are the risks connected to whitelisting `https://docs.google.com` for iframes? It’s a pretty huge and diverse domain…

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [9 april 2018 om 20:24 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/5 "2018-04-09T20:24:51Z")

</div>

I don’t know. Perhaps someone from the Discourse team can answer how iframes are walled off from the application.

Whitelisting could be narrowed down to the specific form, though. For example, this will work as an allowed iframe source:

`https://docs.google.com/forms/d/e/1FAIpQLSfshJKrg_toMlnQtiUeBILwdiCTQhs54z7xHgzbRVuiQyJ6I/viewform`

The full source from Google for the example above would be:

`<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSfshJKrg_toMlnQtiUeBILwdiCTQhs54z7xHgzbRVuiQyJ6I/viewform?embedded=true" width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>`

---

<div class="post-metadata">

### Author: ![AryaM](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aryam/32/312508_2.png) [@AryaM](https://meta.discourse.org/u/AryaM)
#### Post date: [8 augustus 2023 om 07:50 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/6 "2023-08-08T07:50:18Z")

</div>

> [@omarfilip](#):
>
> It is - you’ll have to allow the `https://docs.google.com` as the source domain prefix in allowed iframes.
> 
> Search for _iframe_ in your Discourse settings.

I have enabled this, but it’s still not getting embeded

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [8 augustus 2023 om 15:31 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/7 "2023-08-08T15:31:51Z")

</div>

Did you wrap it in iframe tags?

---

<div class="post-metadata">

### Author: ![AryaM](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aryam/32/312508_2.png) [@AryaM](https://meta.discourse.org/u/AryaM)
#### Post date: [9 augustus 2023 om 08:01 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/8 "2023-08-09T08:01:19Z")

</div>

yess, I did.  
You’re talking about allowed iframes right?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [9 augustus 2023 om 13:44 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/9 "2023-08-09T13:44:48Z")

</div>

Hi AryaM 🙂

Here’s a detailed step-by-step to ensure you configured things right.

In your Discourse settings:

1. Add `https://docs.google.com` in your `allowed iframes` settings:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/b/7/3/b738c283c3a3a1734854e50cc8dcf2f5589cb06e.png)

From Google Forms:

1. Click Send:  

2. Click the \< \> (iframe) button:  

In Discourse:

1. Paste the iframe code in a post:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/2/2/5/2256a61fc1e0325db9e3a3e14d761751ebd5572f.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [11 september 2023 om 12:44 UTC](https://meta.discourse.org/t/how-to-embed-a-google-form/84888/10 "2023-09-11T12:44:01Z")

</div>


