Home arrow Support arrow Forums
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Multiple Question Validation (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Multiple Question Validation
#5938
leochaton (Moderator)
Moderator Lime
Posts: 318
graphgraph
User Offline Click here to see the profile of this user
Multiple Question Validation 1 Year, 3 Months ago Karma: 13  
Hi,

I found a way to validate multiple questions, for example if you want to be sure that the sum of two answers are 100 or things like that, this is documented in the wiki: docs.limesurvey.org/tiki-index.php?page=..._Question_Validation

Is not a perfect solution, but can work in most cases.

Gustavo
 
Logged Logged  
  The administrator has disabled public write access.
#5943
ITEd (Moderator)
LimeSurvey Team
Posts: 376
graphgraph
User Offline Click here to see the profile of this user
Re:Multiple Question Validation 1 Year, 3 Months ago Karma: 10  
To my inexpert eye that looks pretty good, Gustavo.

I wonder (also inexpertly) whether that wouldn't also work to do a calculation on multiple answers in ONE question, eg. in a multiple short text question which is restricted to numbers. I'm sure I've seen mention that one is able to refer to one of many answers in one question by sidXgidXqidAnswerCode ? (Please point me to the documentation - I can't find it!) If I have that right, adding the AnswerCode would allow calculations on answers in one question, wouldn't it?

Martin
 
Logged Logged  
  The administrator has disabled public write access.
#5944
leochaton (Moderator)
Moderator Lime
Posts: 318
graphgraph
User Offline Click here to see the profile of this user
Re:Multiple Question Validation 1 Year, 3 Months ago Karma: 13  
Martin, yes, it should work, as you said adding the Answer code at the end of the SGQA code (look at docs.limesurvey.org/tiki-index.php?page=SGQA+Identifier)

Gustavo
 
Logged Logged  
  The administrator has disabled public write access.
#10875
kinji5 (User)
Fresh Lemon
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Re:Multiple Question Validation 10 Months ago Karma: 0  
Has anyone got this to work with 1.70 Stable?
When i put the code in the question, it just displays all the code back.

Code:

 Test question here <script>function validation() { if ("{INSERTANS:68148X7X43}" != "{INSERTANS:68148X7X42}") { alert("Your responses don't match Check them"); document.limesurvey.move.value = 'moveprev'; document.limesurvey.submit(); } } setTimeout("validation()",250);</script> 
 
Logged Logged  
  The administrator has disabled public write access.
#10885
Mazi (Moderator)
Moderator Lime
Posts: 3514
graph
User Online Now Click here to see the profile of this user
Re:Multiple Question Validation 10 Months ago Karma: 28  
Normally we don't provide support for unofficial releases listed in the wordaround section.

Just a few hints:

1. Try switching the modes of the HTML/WYSIWYG/whatever editor in config.php).

2. Search the forum for users that have had similair problems when trying to put code into the questions.

3. Try using the code with the 1.53 release. It has a different handling of source code putted in questions.

If you succeed please report back and extend the hints in the wiki/manual.
 
Logged Logged  
 
Last Edit: 2008/03/14 01:16 By Mazi.
 
Best regards,
Mazi
______________________
Need help? I can: set up Limesurvey for you / create your survey / implement additional features / design your template / offer premium support -> Contact.
  The administrator has disabled public write access.
#10892
kinji5 (User)
Fresh Lemon
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Re:Multiple Question Validation 10 Months ago Karma: 0  
Will do! I will try your suggestions. thanks!
 
Logged Logged  
  The administrator has disabled public write access.
#21700
chuelibrueder (User)
Fresh Lemon
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:Multiple Question Validation 1 Month, 1 Week ago Karma: 0  
It might also be a very simple problem, I think you might not have included the code in the source but in the standard editor. If you wanna include java code, you have to open the extended editor (lemon with a plus symbol) and then press the source button. I think you might have missed point 5 in this tutorial docs.limesurvey.org/tiki-index.php?page=Workarounds#Javascript.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top