Survey as a "popup" on web page

4 years 4 months ago #88735 by granen

A customer wants to don an evaluation regarding who is visiting their homepage. To do this they would like to add a survey on their page. This survey should pop-up and ask if the visitor would like to participate.

Functions needed.
- The survey pops-up with some script. Not a new window since browsers blocks this.
- Visitor answer if the would like to participate
- Visitors answers a one page survey either on the page or in a new window
- The pop-up only appears once for every IP or based on a cookie.

Should I use limesurvey for all parts or create a script that pops-up and ask if they would like to participate and then forwards them to a limesurvey survey?


Please Log in to join the conversation.

4 years 4 months ago #88755 by tpartner
This is really out of the scope of this forum because it refers to the behaviour of your site, not LimeSurvey but you could place the survey in an iframe and then display it with something like a jQuery UI modal dialog -

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

4 years 4 months ago #89004 by granen
Thanks for the tips, will check this out!

Please Log in to join the conversation.

4 years 3 months ago #89869 by kchayka
I want to do this as well, but I'm having an issue and don't know if there is a clean way around it. I'm using LimeSurvey with a custom CMS.

On the home page I added a modal iframe pop-up (not jQuery, but same idea) to ask the visitor to take the survey. If they agree they are taken to the survey page. If they decline I set a cookie, with the intent they won't be hassled with the pop-up again. I also don't want to hassle them with the pop-up if they have already completed the survey, but due to the path LimeSurvey sets in the cookie ("/survey/index.php/survey") that info is not available on the site's home page.

Other than hacking the core SurveyRuntimeHelper.php file to change the path to "/", is there a means to access the LS_$sid_STATUS cookie, or maybe another way to handle this?

I do realize that the visitor might not even accept cookies or remove them at end of session, but that's not important. What I want to do is merely intended as a convenience for most users.

Please Log in to join the conversation.