- Posts: 15
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
4 years 1 month ago #195055
by artasom
Array question (both text and number) cannot enforce it is an integer was created 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
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
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
4 years 1 month ago #195061
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Array question (both text and number) cannot enforce it is an integer
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
4 years 1 month ago #195066
by artasom
Replied by artasom on topic Array question (both text and number) cannot enforce it is an integer
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
4 years 1 month ago #195067
by artasom
Replied by artasom on topic Array question (both text and number) cannot enforce it is an integer
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13639
- Thank you received: 2491
4 years 1 month ago - 4 years 1 month ago #195116
by DenisChenu
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.
Replied by DenisChenu on topic Array question (both text and number) cannot enforce it is an integer
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.
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
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13639
- Thank you received: 2491
4 years 1 month ago #195117
by DenisChenu
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.
Replied by DenisChenu on topic Array question (both text and number) cannot enforce it is an integer
I don't see the issue for Array text ?tpartner wrote: the array-texts does not.
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.