Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: validation)

  • DenisChenu
  • DenisChenu's Avatar
16 Feb 2024 09:40
Replied by DenisChenu on topic Validation code d'identification répondants
Tu peux importer un foichier CSV avec les codes.

Et donc mettre ce que tu veux
  • Isa_SA
  • Isa_SA's Avatar
15 Feb 2024 22:34
Bonjour,Nous devons faire un questionnaire pour des enfants de primaire (8-9 ans) et, comme c’est un questionnaire anonyme, ils vont avoir un code d’identification pour le compléter.Étant donné que nos répondants sont assez petits, le risque d’erreurs est grand. Alors, nous aimerions savoir s’il existe une possibilité sur LimeSurvey d’entrer d’avance les codes d’identification des enfants pour contrôler un peu la possibilité qu’ils fassent des erreurs en saisissant leur code.Sinon, est-ce qu’il y a un autre moyen pour contrôler ça?Nous avons aussi pensé à leur demander de saisir leur code deux fois, mais dans ce cas, est-ce qu’on pourrait « programmer » LimeSurvey pour que, si jamais il y a une différence entre les codes saisis, ça leur empêche de continuer?Merci!!
  • VictorROYER
  • VictorROYER's Avatar
15 Feb 2024 14:26
Aidez-nous à vous aider et remplissez les cases appropriées :
Votre version de LimeSurvey : Version de votre LimeSurvey : 6.4.1
Votre propre serveur ou LimeSurvey Cloud : propre serveur
Thème :
Regex, Sous Questions, Validation des entrées utilisateurs, Message d'erreur
==================


Bonjour,

J'utilise limesurvey pour gérer mes utilisateurs. J'organise mon enquête avec une question et autant de sous questions que j'ai d'utilisateurs.
Dans le cas où on doit changer une adresse mail, je possède un input et une regex sur cette input pour vérifier que l'entrée utilisateur correspond bien à une adresse mail.

En revanche, je possède beaucoup d'adresses mails et une erreur dans une entrée utilisateur arrive vite.
Je reçois alors un message d'erreur, mais ce dernier ne me donne pas d'indication sur la ligne (sous-question) a corriger.

J'aimerai savoir comment je peux customiser le message d'erreur si un input d'une sous question ne valide pas ma regex pour qu'il m'affiche précisément la ligne qui n'est pas bonne.


Exemple :






Pour le moment, j'ai modifier la ligne 346 du fichier qanda_helper.php :

            $vpopup = gT("One or more questions have not been answered in a valid manner : " . $ia[2] . " You cannot proceed until these answers are valid.");

avec $ia[2] étant le code de ma question, mais j'aimerai y mettre le code de ma sous question, voir si possible le text de ma sous question.

Cordialement

 
  • MVelikova
  • MVelikova's Avatar
14 Feb 2024 08:00 - 14 Feb 2024 08:07
Yes, i try to export by syntax file and data file and yes i copy the survey without this script and its the same error. I create one survey with only one question of type array number without any validations and scripts, activate it and enter data and export still doesn't work. I write about the problem after i have test all of this.
  • DenisChenu
  • DenisChenu's Avatar
11 Feb 2024 11:31
Tout est là : manual.limesurvey.org/Expression_Manager
Ce n'est pas du développement, c'est du niveaux des formules excel.

Pour t'aider : ajoute d'abord manual.limesurvey.org/Question_type_-_Mu..._.28max_num_value.29 une valuer maximale.
Ensuite : regarde le Survey logic file de la question  
Puis tui va utiliser manual.limesurvey.org/Question_type_-_Mu...28em_validation_q.29 pour restreindre à tes seules sous questions.

 
  • ngolub
  • ngolub's Avatar
06 Feb 2024 11:41
Thank you very much for your help!

Next time, I will ask in the German forum (I am new to LimeSurvey and did not even know that the German forum existed).
  • Joffm
  • Joffm's Avatar
05 Feb 2024 20:14
1. What is wrong with this message?
You have a question validation tip that shows an error if the respondent enters something not valid.
If he ignores this and tries to proceed the above message is displayed.

Nevertheless,
maybe this helps
[url] forums.limesurvey.org/forum/design-issue...soft-warning-message [/url]

2. Yes, obvious, because the question validation fails. So the entire question is marked red.
You can redesign the question to show the error only in the subquestion,
but - to be honest - I am tired to answer here in English without necessity.

Ask it in the German part and we can discuss it without language gap

Joffm
 
  • ngolub
  • ngolub's Avatar
05 Feb 2024 18:22
Thank you very much; this worked like a charm!

I have two follow-up questions:

1. Now, if a survey participant does not enter a number, a message appears saying they cannot proceed. How can I edit the text in the message?

2. All the response fields of the question are highlighted in red if the input is character instead of numeric. Is it possible to only have subquestion 3 highlighted in red, since 1 and 2 may have characters as input?

 
 

Thank you!
  • Joffm
  • Joffm's Avatar
05 Feb 2024 17:00
Yes, always try with something simple and test your equations by inserting them into the question text (with curly brackets)

You will find that "regexMatch" does not support this construct {0,4}
So an easy first workaround is
regexMatch("/^[1-9][0-9]*$/", Q1_3.NAOK) and Q1_3<100000
But here you get an initial error while the cell is still empty.
So add this and it is fine.
is_empty(Q1_3) or (regexMatch("/^[1-9][0-9]*$/", Q1_3.NAOK) and Q1_3<100000)

Or you only use comparisons like
is_empty(Q1_3) or (Q1_3>0 and Q1_3<100000)

Joffm
  • ngolub
  • ngolub's Avatar
05 Feb 2024 16:44 - 05 Feb 2024 16:46
I want the third answer option ("Anzahl Jahre:") to only accept a numerical input as a valid answer.

By "it did not work," I mean that the subquestion validation equation does not achieve this desired result. 

 
  • holch
  • holch's Avatar
05 Feb 2024 16:39
What does "it did not work" mean exactly? What is the exact issue?
  • ngolub
  • ngolub's Avatar
05 Feb 2024 16:18
Thank you. I tried that, but unfortunately, it did not work.
  • DenisChenu
  • DenisChenu's Avatar
05 Feb 2024 16:01
Seems OK, maybe regexMatch("/^[1-9][0-9]{0,4}$/", vorherigePos_3.NAOK) ?
  • ngolub
  • ngolub's Avatar
05 Feb 2024 15:16 - 05 Feb 2024 15:33
Thank you, will do! Do you happen to know what the correct validation equation would be for this problem?

I have tried this as well: regexMatch("/^[1-9][0-9]{0,4}$/", vorherigePos_3)
  • Joffm
  • Joffm's Avatar
05 Feb 2024 15:08
Hi,
"preg_match" is not a valid function in LimeSurvey.
Please, read the manual about "implemented functions"

Joffm
Displaying 31 - 45 out of 182 results.

Lime-years ahead

Online-surveys for every purse and purpose