Welcome to the LimeSurvey Community Forum

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

Mandatory Hidden Question and Input Validation

  • alpaalpa
  • alpaalpa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 1 week ago #269488 by alpaalpa
Please help us help you and fill where relevant:
LimeSurvey version: LimeSurvey Community Edition Version 6.10.5+250217 
Own server or LimeSurvey Cloud: Own Server
Survey theme/template: irrelevant (fruity_twentythree)
==================
I have an anonymous survey which I want to send out to different groups of people using a prefilled code in the URL, in the form of the following:

https://server/limesurvey/index.php/485329?CODE=group1

Where 'CODE' is the question code of one of the questions.  
The question is 'hidden'.

However, what can I do to stop people from deleting that from the URL and just enter the survey using:
https://server/limesurvey/index.php/485329

I tried to make the hidden mandatory and do input validation.  However, it seems that they are ignored.

Is there anyway I can do input validation for a hidden question?
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago - 1 month 1 week ago #269489 by Joffm
Use an equation to check, like
{if(is_,empty(CODE),0,1)}
Now you can set a quota on the equation and screen out, if the value is 0.

But this doesn't recognise a changed parameter.
My first ideas:
1. Check if the parameter is in a list of all possible.
This list you can create as default value in a "long text" question (hidden). Check with an equation like {if(strpos(list,CODE)>0,1,0)}

2. Use parameters that you calculate a value by some arithmetic operations. If the "magic" value is not met, screen out.

Joffm 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 1 week ago by Joffm.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose