embed survey in specified web page div

More
6 years 6 months ago #81011 by wanja
wanja created the topic: embed survey in specified web page div
can a limesurvey be embedded in a specified web page div? if so, how?

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

More
6 years 6 months ago #81012 by DenisChenu
DenisChenu replied the topic: embed survey in specified web page div
Hello,

The quickiest and easy way is to include it in an iframe.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

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

More
6 years 6 months ago #81043 by wanja
wanja replied the topic: embed survey in specified web page div
thanks for the reponse.


is there an example or reference for the code that would be included in the iframe? more specifically would I use a link or need to look at code on the server and replicate what is needed in the iframe?

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

More
6 years 6 months ago #81045 by DenisChenu
DenisChenu replied the topic: embed survey in specified web page div
....
<iframe id="enid" title="My Survey"  src="http://yoursurveysurl/index.php?sid=76475&newtest=Y"></iframe>
www.w3.org/TR/html4/present/frames.html

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

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

More
4 months 2 weeks ago #171779 by bshores
bshores replied the topic: embed survey in specified web page div
I don't believe this is possible anymore, as LimeSurvey has added CSRF tokens, which are blocked in more browsers now as "third party tokens" under an iFrame.

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

More
4 months 2 weeks ago #171783 by holch
holch replied the topic: embed survey in specified web page div
This post was never about surveys with tokens...

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 2 weeks ago #171787 by bshores
bshores replied the topic: embed survey in specified web page div
OK, so if you think I mean LimeSurvey tokens, then that's not the case.

To watch for cross site references, LimeSurvey creates CSRF tokens ( think cookie, not a token like you create in the admin page for a survey ). These tokens are used when you enter and start a survey to make sure you are who you say you are and someone isn't spoofing your browser with a hidden iframe type deal. Unfortunately, Safari and mobile apps block cookies in an iFrame, so limesurvey gives you this wonder 400 error and won't let you take the survey.

Does that explain better?

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

More
4 months 2 weeks ago #171788 by holch
holch replied the topic: embed survey in specified web page div
You checked the setting specifically for iframes, right?
manual.limesurvey.org/Global_settings

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 2 weeks ago #171811 by jelo
jelo replied the topic: embed survey in specified web page div

bshores wrote: LimeSurvey creates CSRF tokens

LimeSurvey uses Yii 1.1 framework, which is setting the CSRF cookies.
www.yiiframework.com/doc/guide/1.1/en/topics.security

Not many settings of the Yii framework are exposed to the GUI of LimeSurvey.
You might take a look at the config files and change the default behaviour of LS/Yii there.

manual.limesurvey.org/Optional_settings#Session_settings

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
The following user(s) said Thank You: DenisChenu, LouisGac

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

More
4 months 2 weeks ago #171815 by DenisChenu
DenisChenu replied the topic: embed survey in specified web page div

bshores wrote: …Unfortunately, Safari and mobile apps block cookies in an iFrame, so limesurvey gives you this wonder 400 error and won't let you take the survey …

I think it's fortunately

But you can test with disabling CRSF, if i remind it work with survey in all in one page.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

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

More
4 months 1 week ago #171895 by bshores
bshores replied the topic: embed survey in specified web page div
This is running on a customers instance, and they "for obvious reasons" don't want that setting turned off.

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

More
4 months 1 week ago #171896 by bshores
bshores replied the topic: embed survey in specified web page div
Fortunately might be the better word, though I don't see a malicious person wanting to fill out a survey for another user without their knowledge for any good reason. I guess maybe if it was something like Amazon feedback where you wanted to pump up your reputation for a product, but in my guess, there's no good reason to spoof data.

But yes, I've had to go off the iFrame route. Can't disable CRSF in the global limequery site, and the instance I'm running on from a customer also has it on.

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

More
4 months 1 week ago #171926 by LouisGac
LouisGac replied the topic: embed survey in specified web page div
in admin/globalsettings#security ; IFrame embedding allowed: Allow / Same Origin

this could 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!