Embed website in Limesurvey (iframe?)

More
4 months 3 weeks ago #167809 by Skowronski
Skowronski created the topic: Embed website in Limesurvey (iframe?)
Hello dear Community!

For my study, I need to let people play an online game for 30 minutes. Before and after, they need to fill out questionnaires.
For this reason, I need to find a way how to include a foreign website (the game) in my LimeSurvey questionnaire.
The idea was to embed the game via iframe. How do I do this exactly? I tried to put this: <iframe frameborder="0" height="500" scrolling="no" src="LINK TO GAME" width="800"></iframe> in the source code of a text display question. But when I save it, the text is gone and nothing happens.
What can I do? What am I doing wrong?

Thanks for the help!
Marika

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #167817 by Joffm
Joffm replied the topic: Embed website in Limesurvey (iframe?)
Hello, Marika,

yes it is correct.
<div class="embed-responsive "><iframe allowfullscreen="" class="embed-responsive-item" frameborder="0" src="http://www.limesurvey.org"></iframe></div>

You have to enter it in "source code mode"?



Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #167818 by Skowronski
Skowronski replied the topic: Embed website in Limesurvey (iframe?)
Thank you for your help.
I tried to do it with your example code and the example website, but it did not work. I ended up having a result like in the attachment.
And again, after I saved the question, the text in the "source code mode" is gone... :(
Do you or anyone has/have an idea what I can do?
Attachments:

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #167819 by holch
holch replied the topic: Embed website in Limesurvey (iframe?)
Did you switch off the XSS filter? (not sure if this is necessary though, but when it comes to filtering code it is often the XSS filter which is on).

Did you have a look at this here:
manual.limesurvey.org/Global_settings#Security --> IFrame embedding allowed

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #167822 by Joffm
Joffm replied the topic: Embed website in Limesurvey (iframe?)
One addition:By the way:

Statement of markusfluer
https://www.limesurvey.org/forum/german-forum/113837-wie-entferne-ich-den-balken-in-den-die-frage-soll?start=15#164192

Translated:
For the source code mode you need administration rights.
In other words, if you do not have administration rights on your installation, it will not work for you.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago - 4 months 3 weeks ago #167840 by Skowronski
Skowronski replied the topic: Embed website in Limesurvey (iframe?)
I switched off the XSS filter and it worked. I am also able to change the source code of the question.
I used the code that Joffm posted as an example:
<div class="embed-responsive "><iframe allowfullscreen="" class="embed-responsive-item" frameborder="0" src="http://www.limesurvey.org"></iframe></div>
But it only worked for me without the div-class and without the "embed-responsite-item class".
Problem is now that I do not manage to show the website on fullscreen mode. When I put width and height to 100%, the width of the website is perfect but the height is rather small.
Any ideas why this worked out for you but not for me?
When I change the height from 100% to 500 (e.g.), it looks fine on my screen but does not adjust to a smaller screen.
Last Edit: 4 months 3 weeks ago by Skowronski.

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago - 4 months 3 weeks ago #167844 by Joffm
Joffm replied the topic: Embed website in Limesurvey (iframe?)
Hi,
1. till now you didn't tell us which version of LS you use.
Well, I think you show us the default template of the 2.50 branch.

I do not think that you will get a fullscreen mode.
You still embed the web page in the question container.

Two ideas:
1. Insert only a link to the game, which the repondents click.
Something like:
<span style="font-size:20px;"><em><a href=" www.limesurvey.org " target="_blank">Go to the Game</a></em></span>

2. If you programmed the game you could use end-url
(Split your survey, after the first part the end-url links to the game and the game links to the second part orf the survey. you can passthrough some parameters)

Joffm


P.S.
I did not see any issues using the div; neither in v2.73 nor in v3.7.0


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last Edit: 4 months 3 weeks ago by Joffm.

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago - 4 months 3 weeks ago #167847 by Skowronski
Skowronski replied the topic: Embed website in Limesurvey (iframe?)
Thank you for the quick reply.
I am using the version 2.52+160920.

Your ideas are very nice, but I did not program the game and I can't include a link to the game: I need to get my participants back to the survey after 30 minutes - so I thought of using the timer function offered by Limesurvey. If my participants simply click on a link, they can't be automatically redirected to limesurvey, can they?

Anyway, I do not need a "real" fullscreen mode. It would be enough if the question container adjusts to maximum width and height. Is that possible?
Right now, the question looks like this and this is too narrow:



It would be great if you could help.
Attachments:
Last Edit: 4 months 3 weeks ago by Skowronski.

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #167850 by Joffm
Joffm replied the topic: Embed website in Limesurvey (iframe?)

they can't be automatically redirected to limesurvey, can they?

Well, they do not leave LS, because target="_blank".
If they close the game they are back.


The other issue.
I can only repeat:
I use Version 2.73.1+171220

and this code
<div class="embed-responsive embed-responsive-16by9"><iframe allowfullscreen="1" class="embed-responsive-item" frameborder="0" src="https://www.limesurvey.org"></iframe></div>
shows this


There is something else you can try:
<div class="embed-responsive embed-responsive-16by9"><object data=" www.limesurvey.org " style="overflow:auto;border:4px solid black" type="text/html"></object></div>

But if I set the width and height to 100% I get your result ( the very small one)
Because of the responsive div the page adapts to the screen; think of smartphones or tablets.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #168455 by Skowronski
Skowronski replied the topic: Embed website in Limesurvey (iframe?)
The Limesurvey update did the trick and your code worked.
Thank you for your help!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!