Numeric Response Validation for a comments box

Plus d'informations
il y a 1 mois 1 semaine #188711 par x_Dbeethekidd_x
Hi All


I've tried to use the manual but it really doesn't make any sense to me in terms of what and where I need to enter the expressions/validations etc to achieve what I'm trying to do

I basically want to enforce a numeric response in the comments box from a multiple choice (unless there is a better question layout to use)

Thanks

DB

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 1 mois 1 semaine #188721 par Joffm
Hi, DB,
well, in my opinion there are other options:
Now the respondent selects an item and then has to enter a numeric value into the comment box?
In an multiple numerical input the respondent only enters the numerical values into the selected cells - others stay empty.
You get the same information: Which item was selected and which value was entered.

But in your case:
You know how this question type is stored in the answer table.
You see it there:


So the question validation equation could be:
The comment box is either empty or the entered value is numeric.
In
https://manual.limesurvey.org/Expression_Manager_-_presentation#Implemented_functions
you find exactly these two needed functions
  • is_empty: Determine whether a variable is considered to be empty
  • is_numeric: Finds whether a variable is a number or a numeric string

We said "The comment box is either empty or the entered value is numeric."
Meaning:
is_empty(Q1_SQ001comment) OR is_numeric(Q1_SQ001comment)

This you validate for all subquestions:
(is_empty(Q1_SQ001comment) OR is_numeric(Q1_SQ001comment)) AND
(is_empty(Q1_SQ002comment) OR is_numeric(Q1_SQ002comment)) AND
...
(is_empty(Q1_SQ00Xcomment) OR is_numeric(Q1_SQ00Xcomment))

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #188731 par Joffm
By the way, here are a few other ways to ask this questions:

built-in




with javascript




Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!