Validating individual fields in an array

Plus d'informations
il y a 1 semaine 5 jours #183087 par MalcolmHart
COM_KUNENA_MESSAGE_CREATED_NEW
LimeSurvey 2.65.

Hi

I have a question called CostsArray that consists of 7 subquestions, each with three answers, forming a 7 x 3 array or table.

The codes for each row of the array are (I presume) 1, 2, 3, 4, 5, 6, 7 and the subquestions (columns) are SQ001, SQ002...

I'm attempting, and failing, to ensure that if the user enters anything in the top left field of the table, they will be told that this field should not be completed. All the other fields may contain an integer.

As far as I understand it, the field in question is CostsArray_1_SQ001.NAOK

I have tried the following, adding the following to the 'Sub-question validation equation' field:

!is_empty(CostsArray_1_SQ001.NAOK)

and an error message to the 'Sub-question validation tip' field.

However, when testing it, I find that the error message (together with the 'Only numbers may be entered in these fields') is already visible on the page when it loads. When I enter numbers into the first (or indeed any field), both messages disappear and reappear with each keystroke and I have no idea why.

It strikes me that this should be a straightforward thing to do, but I am at a loss.


Is my expression correct?

Am I incorrect in thinking that I can validate each of the fields in my table individually?

Is it possible to validate only the first cell in the first row?

Why do the built-in error message ("Only numbers may be entered...") and my error message ('"Do not complete this field") both fire, regardless of the content of any of the fields?

Is it possible to display only the relevant message/tip?



Many thanks in advance

Malcolm

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

LimeSurvey Partners
Plus d'informations
il y a 1 semaine 5 jours #183093 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
What is the exact question type ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

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

Plus d'informations
il y a 1 semaine 5 jours #183099 par MalcolmHart
COM_KUNENA_MESSAGE_REPLIED_NEW
Thanks Denis. It's an array of numbers; none are mandatory. Is that what you meant?

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

Plus d'informations
il y a 1 semaine 5 jours #183111 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
Did you try CostsArray_SQ001_1.NAOK ?

And for testing : put this in question text

If you can send a sample lss file too.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

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

Plus d'informations
il y a 1 semaine 5 jours #183112 par holch
COM_KUNENA_MESSAGE_REPLIED_NEW
Generally, in an array (of not array by column) the columns are answer options and the rows are the subquestions. Probalby your problem is there.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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!