Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

embed survey in specified web page div

More
12 years 6 months ago #81011 by wanja
can a limesurvey be embedded in a specified web page div? if so, how?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
12 years 6 months ago #81012 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
12 years 6 months ago #81043 by wanja
Replied by wanja on 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?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
12 years 6 months ago #81045 by DenisChenu
Replied by DenisChenu on topic embed survey in specified web page div
....
Code:
<iframe id="enid" title="My Survey"  src="https://yoursurveysurl/index.php?sid=76475&amp;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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 4 months ago #171779 by bshores
Replied by bshores on 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.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #171783 by holch
Replied by holch on topic embed survey in specified web page div
This post was never about surveys with tokens...

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
6 years 4 months ago #171787 by bshores
Replied by bshores on 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?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #171788 by holch
Replied by holch on topic embed survey in specified web page div
You checked the setting specifically for iframes, right?
www.limesurvey.org/manual/Global_settings

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
6 years 4 months ago #171811 by jelo
Replied by jelo on 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.

www.limesurvey.org/manual/Optional_settings#Session_settings

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu, LouisGac
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
6 years 4 months ago #171815 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 4 months ago #171895 by bshores
Replied by bshores on 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.
The topic has been locked.
More
6 years 4 months ago #171896 by bshores
Replied by bshores on 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.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose