Welcome to the LimeSurvey Community Forum

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

Array question (both text and number) cannot enforce it is an integer

  • artasom
  • artasom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #195055 by artasom
Hello,
I am trying to create an array where the user can input numbers but I would like the numbers to be just integers. I have tried both with Text and Numbers arrays. In the case of Text Arrays I am enforcing "only numbers".
In the subquestion validation I have added the following formula
is_empty(this) or is_int(this)
In both cases I can add non integer values.
Does anyone have a clue of what I am doing wrong?

LimeSurvey version 3.22.7
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195061 by tpartner
I find that the array-numbers works as expected, the array-texts does not. Please report that as a bug.




Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • artasom
  • artasom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #195066 by artasom
I will log the bug, but for me neither the array-number nor the array-text work, as you can see in the screenshot I attached.
On the other hand, I would expect that is_int would evaluate 4.0 as false, this is, that the system corrects the value to 4.
Thanks for your time.
The topic has been locked.
  • artasom
  • artasom's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #195067 by artasom
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago - 4 years 1 month ago #195116 by DenisChenu
In your survey : you don't have tips .... @tpartner have tips.

And i have exactmly the same issue for array number : no error are shown.

Else : you still can not submit invalid value .... in both.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 1 month ago by DenisChenu.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195117 by DenisChenu

tpartner wrote: the array-texts does not.

I don't see the issue for Array text ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose