How to embed a Google Form?

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?

1 „Gefällt mir“

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.

11 „Gefällt mir“

Works great. Thanks.

2 „Gefällt mir“

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

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>

4 „Gefällt mir“

[quote=„omarfilip, post:2, topic:84888, full:true”]
Das ist es – Sie müssen https://docs.google.com als Präfix der Quell-Domain in den erlaubten iframes zulassen.

Suchen Sie in Ihren Discourse-Einstellungen nach iframe.
[/quote]

Ich habe dies aktiviert, aber es wird immer noch nicht eingebettet.

Haben Sie es in iframe-Tags eingebettet?

Ja, das habe ich. Sie sprechen über erlaubte iframes, richtig?

Hallo AryaM :slight_smile:

Hier ist eine detaillierte Schritt-für-Schritt-Anleitung, um sicherzustellen, dass du die Dinge richtig konfiguriert hast.

In deinen Discourse-Einstellungen:

  1. Füge https://docs.google.com zu deinen allowed iframes-Einstellungen hinzu:

Aus Google Forms:

  1. Klicke auf Senden:

  2. Klicke auf die Schaltfläche < (iframe):


    Und kopiere den iframe-Code.

In Discourse:

  1. Füge den iframe-Code in einen Beitrag ein:
4 „Gefällt mir“