One survey with 3 different themes OR include survey?

More
5 years 2 months ago #78469 by Raisis
Raisis created the topic: One survey with 3 different themes OR include survey?
Hi everybody,

I've got an survey which I like to display on 3 different webpages, with different CSS styles. My first idea was to include the survey on the page and insert the survey styles to the CSS of the whole webpage. This works for the design.

But I've got a problem: If I filled out the survey loads again and the window just display the survey without styling. Is there maybe a possibility to load the last page with the ending message via AJAX?

OR:

The second possibility would be to load the survey in an iframe (but I hate iframes). Is it possible to set the theme via URL? For example mypage.com/limesurvey/index.php?sid=72428&lang=de&theme=theme1? Does this work?

Thank you for your help.

Please Log in to join the conversation.

More
5 years 2 months ago #78484 by DenisChenu
DenisChenu replied the topic: One survey with 3 different themes OR include survey?
You can try with:
[code type=php-brief]// CMS Integration Settings
// Set $embedded to true and specify the header and footer functions - for example if the survey is to be displayed embedded in a CMS
$embedded = false;
$embedded_inc = ''; // path to a php file to include
$embedded_headerfunc = ''; // e.g. COM_siteHeader for geeklog
$embedded_footerfunc = ''; // e.g. COM_siteFooter for geeklog
[/code]

You have to "manullay" put the limesurvey javascript link in you head.

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 to join the conversation.

More
5 years 2 months ago - 5 years 2 months ago #78517 by Raisis
Raisis replied the topic: Aw: One survey with 3 different themes OR include survey?
Hi,

no, this solution does not really work for me. I've got 3 different pages and the path to the header and footer files are different :/
Last Edit: 5 years 2 months ago by Raisis.

Please Log in to join the conversation.

More
5 years 2 months ago #78522 by DenisChenu
DenisChenu replied the topic: Aw: One survey with 3 different themes OR include survey?
Yep, But in your embedded_headerfunc, you can test the $surveyid or the groupid and include the header you want.

embedded_inc :
- Set a default path ( $path="../default/header.ph)
- Test the sid or the actual group id ( see index.php to see how).
- according to this sid/gid: change the path ( $path="../thenew/header.ph)
- embedded_headerfunc include the header from the actual path

Need some work :)

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 to join the conversation.

More
5 years 2 months ago #78536 by Raisis
Raisis replied the topic: Aw: One survey with 3 different themes OR include survey?
I haven't really understand it... :(

Where can I get the sid/gid? And how can I fit a sid to the header and footer?

Thank you for your help :)

Please Log in to join the conversation.

More
5 years 2 months ago #78539 by DenisChenu
DenisChenu replied the topic: Aw: One survey with 3 different themes OR include survey?
Look at index.php code.
There are a lot of example .

Need php dev's.

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 to join the conversation.

More
5 years 2 months ago #78630 by Mazi
Mazi replied the topic: One survey with 3 different themes OR include survey?

Raisis wrote: Is it possible to set the theme via URL? For example mypage.com/limesurvey/index.php?sid=72428&lang=de&theme=theme1? Does this work?

I think there is a similar idea ticket at ideas.limesurvey.org for which you can vote there.

Why don't you create two copies of the survey and merge data later?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now