Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: validation)

  • ngolub
  • ngolub's Avatar
05 Feb 2024 15:02
Please help us help you and fill where relevant:
Your LimeSurvey version:  LimeSurvey Community Edition   Version 6.4.0+231218 
Own server or LimeSurvey hosting: own server
Survey theme/template: bootstrap vanilla
==================
Hi I have a multiple short text type question and am trying to create a subquestion that will only allow numerical input.

My question's code is: "vorherigePos" and my subquestion code is "3".

I have tried this expression in the subquestion validation equation field but it did not work: preg_match('/^[0-9]+$/', vorherigePos_3.NAOK)

Can you help me find the correct code for this?

Thank you!
 
  • DenisChenu
  • DenisChenu's Avatar
02 Feb 2024 10:06
Replied by DenisChenu on topic Error: CSRF token could not be verified
The system need server update about session samesite (at minima)

manual.limesurvey.org/index.php?title=Op....28New_in_3.24.3_.29

You need to contact LimeSurvey GMBH

Even with this settings : the original server can disallow any external iframe !

See : developer.mozilla.org/en-US/docs/Web/HTTP/CSP
  • holch
  • holch's Avatar
09 Jan 2024 15:15
If the question is mandatory, you need to complete it completely. So you probably will have to create your custom validation in the question validation field and check if at least they year has been chose. You won't be able to use the mandatory question feature.
  • Joffm
  • Joffm's Avatar
04 Jan 2024 12:51
Replied by Joffm on topic Questions aléatoires et équation

Je souhaite que les questions à l'intérieur des groupes 1 et 2 soient toutes données aléatoirement. Comment faire ?

Nom de groupe aléatoire : cela ne fonctionne pas

Ça marche
Pourquoi avez-vous utilisé deux "Nom de groupe aléatoire" différents ?
Alors bien sûr, rien ne se passe.
[url] manual.limesurvey.org/Question_groups_-_introduction/fr [/url]

Je souhaite également que le groupe 3 soit présenté aléatoirement avant ou après le groupe 1 / 2. Comment faire ?

Nom de groupe aléatoire : ça ne marche pas.

Ça marche.
Il vous suffit de penser à ce que vous voulez qu’il se passe.

Choix 1: Nom de groupe aléatoire "GA1", Condition "random1==1"
Parc ideal
Choix 2: Nom de groupe aléatoire "GA1", Condition "random1==2"

En raison du Nom de groupe aléatoire « choix1 » et « choix2 » s'affichent différemment, mais un seul d'entre eux est affiché en raison de la condition.
Et c'est ce que vous voulez.


"unique"
[url] manual.limesurvey.org/ExpressionScript_-...pl.C3.A9ment.C3.A9es [/url]
En "Logique / Équation de validation de question"

[

attachment=38217]a2.PNG[/attachment]

Je n'arrive pas à ouvrir le fichier que vous avez envoyé (non compatible avec ma version).

Oui, c'est pour la version 6.x.
Si vous aviez mentionné votre version au début, j'aurais un exemple pour la version 3.x. envoyé.

Joffm
  • Joffm
  • Joffm's Avatar
01 Jan 2024 19:01
Replied by Joffm on topic Age group validation
Of course,
you set the quota on the equation.
  • Seikon
  • Seikon's Avatar
01 Jan 2024 18:51
Replied by Seikon on topic Age group validation
I did it this way to set quota controls according to age groups. Can I do as in your example and set quota control again?
  • Joffm
  • Joffm's Avatar
01 Jan 2024 18:43
Replied by Joffm on topic Age group validation
Hi,
do you want to ask both questions?
Why?
Usually you calculate the age group with an equation.
Like
{if(Q1<31,1,if(Q1<50,2,3))}

Joffm
  • Seikon
  • Seikon's Avatar
01 Jan 2024 18:16
Age group validation was created by Seikon
Please help us help you and fill where relevant:
Your LimeSurvey version:5.6.14
Own server or LimeSurvey hosting: Own
Survey theme/template:
==================
(Write here your question/remark)I would like to confirm the answer to my open-ended age question in my next question about age groups.
Q1- Age "Open Ended"
Q2 - Age Group -
1- 18-30
2- 30-49
3- 50+

How can I prevent an option other than the answer given in question Q1 from being marked in question Q2?
  • Reynald
  • Reynald's Avatar
21 Dec 2023 11:28
Replied by Reynald on topic A
Re-Bonjour Denis,

Dans la première question Equation MAILSCRIPT, j'ai positionné le script
{TOKEN:EMAIL}
Dans la seconde ENVOIMAIL, je cherche a comprendre a quoi se rapporte {if(zone1 =='Y',MAILINSCRIT,'')}
Est-ce juste la validation de principe de la première question du premier questionnaire

Merci d'avance

Reynald
  • Joffm
  • Joffm's Avatar
20 Dec 2023 16:40
Hi,
I wrote before:
No need to use validation equations.
Sufficient to set the max value

"children"


"hh+18"

Here it is
if(!is_empty(G01Q06),G01Q05-G01Q06, G01Q05-1)

 

File Attachment:

File Name: limesurvey...9541.lss
File Size:49 KB


Why is it necessary to ask "Do you have children Y/N"?
Just ask for the number of children (if there are no, the respondent enters "0")
You avoid the IF and the max value of 18+hh is Q05-Q06.

Joffm
 
  • tpartner
  • tpartner's Avatar
15 Dec 2023 14:07 - 15 Dec 2023 14:07
Something like this in the question validation equation:

Code:
is_empty(this) OR this < Q1

- manual.limesurvey.org/ExpressionScript_-_Presentation/en
  • nadica123
  • nadica123's Avatar
15 Dec 2023 10:56
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)

Hello,

I would like to validate a numerical input on a question based on the numerical answer of the previous question. For example if an answer to a question is 5 it can't be greater than 4 in the next one. I found the regular expression and the Question validation equation in the settings, but I am not sure if I can add the previous question answer to it or how to exactly.

Thank you.
  • external_eval
  • external_eval's Avatar
11 Dec 2023 14:54
Tony, thank you very much! And I noticed you simplified the relevance equation as well. Every day is a school day:)
Cheers!
Jakub
  • tpartner
  • tpartner's Avatar
11 Dec 2023 14:36 - 11 Dec 2023 14:37
You can add a condition that the corresponding row in Q5 is not empty:

Code:
(is_empty(Q5_SQ001.NAOK) OR sum(self.sq_001.NAOK) > 0) AND
(is_empty(Q5_SQ002.NAOK) OR sum(self.sq_002.NAOK) > 0) AND
(is_empty(Q5_SQ003.NAOK) OR sum(self.sq_003.NAOK) > 0) AND
(is_empty(Q5_SQ004.NAOK) OR sum(self.sq_004.NAOK) > 0) AND...

Sample survey attached: 

File Attachment:

File Name: limesurvey...6614.lss
File Size:60 KB
  • external_eval
  • external_eval's Avatar
11 Dec 2023 14:05
Your LimeSurvey version: LimeSurvey Community Edition V. 3.28.3
Own server or LimeSurvey hosting: Our own server
Survey theme/template: Our own template (based on Fruity)
==================
Hello everyone,
I have a survey in which there is a numeric array (Q6) with subquestions filtered according to the previous multiple-choice question (Q5).
The sum of each subquestion/row in Q6 should be greater than zero (because they selected these non-zero options in Q5), yet it should also allow leaving some fields blank (because filling in many 0s would be tiring). 

The Q6 is not mandatory (to allow leaving blank fields), but I needed at least one non-zero response in at least one column in each row, so I made it kinda mandatory via the question validation equation. The equation states that the sum must be greater than zero in each row. 
I tried sum(self.sq_001.NAOK) !=0 ANDsum(self.sq_002.NAOK) !=0 ANDsum(self.sq_003.NAOK) !=0 ANDsum(self.sq_004.NAOK) !=0 AND
etc
I tried other variants, but none worked. It seems like the filtered-out subquestions fail the validation equation despite NAOK.
A sample of the survey is attached. 
Thank you!
Jakub

 
Displaying 46 - 60 out of 182 results.

Lime-years ahead

Online-surveys for every purse and purpose