Check out the LimeSurvey source code on GitHub!

Personalized End Message based on user response?

More
2 years 11 months ago - 2 years 11 months ago #106190 by gradenh
I've been a long-time fan of LimeSurvey. I appreciate any help that the LimeSurvey community can provide.

I would like to create a survey that asks about a user's interests. There would be a list of 10 possible interests to choose from, and I want the End Message to be personalized with links to resources based on the user's interests.

The list of interests would be multiple-choice question type with check boxes.

Can this be done in LimeSurvey?
Last Edit: 2 years 11 months ago by gradenh.

Please Log in to join the conversation.

More
2 years 11 months ago #106206 by byan
I haven't tried but think you MIGHT be able to do it using conditions. So in addition to the 10-item question, each personalized link will be another label type question and each of them will be in a separate group. Then set your 10-item question condition to do the magic.
The following user(s) said Thank You: gradenh

Please Log in to join the conversation.

More
2 years 11 months ago #106208 by gradenh
That's a really great idea, but I'm not sure I can set conditions on elements inside the End Message?

Please Log in to join the conversation.

More
2 years 11 months ago #106209 by byan
Each label type question will be a link to the personalized web page. You set the conditions for the 10-item question so that when a user make a certain choice he or she will see, on the next survey page, the corresponding label type question with the personalized web link.
The following user(s) said Thank You: gradenh

Please Log in to join the conversation.

More
2 years 11 months ago #106210 by gradenh
I see. So maybe I could modify the survey so that they wouldn't see the "SUBMIT" button that leads them to the end message. If I separate the survey Group-by-Group, clicking "NEXT" to go on to the next survey page saves their answers anyway, right?

Please Log in to join the conversation.

More
2 years 11 months ago #106211 by tpartner
You can use an Expression Manager conditional equation in the end message to pipe in the target URLs - manual.limesurvey.org/Expression_Manager#Conditional_Equations .


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
2 years 10 months ago #107576 by gradenh
So I'm giving this a try, but I am having trouble including HTML into expressions. Is there a way to do this with Expression Manager?

{if(howmany == 1, '<h3 style="color:red;">Your Price: $365/yr</h3>','')}
{if(howmany == 2, '<h3 style="color:red;">Your Price: $245/yr</h3>','')}
{if(howmany == 3, '<h3 style="color:red;">Your Price: $200/yr</h3>','')}
{if(howmany == 4, '<h3 style="color:red;">Your Price: $200/yr</h3>','')}
{if(howmany == 5, '<h3 style="color:red;">Your Price: $175/yr</h3>','')}
{if(howmany == 6, '<h3 style="color:red;">Your Price: $175/yr</h3>','')}
{if(howmany == 7, '<h3 style="color:red;">You will be contacted regarding special pricing.</h3>','')}

Please Log in to join the conversation.

More
2 years 10 months ago #107577 by gradenh
The final result will include a large block of HTML based on specific user responses. The expression logic will be simple. Basically, if A==1 then {insert html here}

Please Log in to join the conversation.

More
2 years 10 months ago #107578 by gradenh
Hey I figured out a solution here.

Create Text Display type questions for each possible answer. Build the html blocks as needed. Then instead of the code above that includes the HTML, simply reference the Text Display type question. For example:

{if(howmany == 1, price1.question,'')}
{if(howmany == 2, price2.question,'')}
{if(howmany == 3, price3.question,'')}
{if(howmany == 4, price4.question,'')}
{if(howmany == 5, price5.question,'')}
{if(howmany == 6, price6.question,'')}
{if(howmany == 7, price7.question,'')}

The only problem is that these answers will be displayed in the survey. UNLESS you choose "Yes" under "Always hide this question" found in the Advanced Settings of the question. This hides the question in the survey, but the HTML will still appear in the End Message.

Please Log in to join the conversation.

More
2 years 7 months ago #110405 by jboogie21
The power of the forums... a few months old post and it really helped me out!

Thanks gradenh!

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form