Welcome to the LimeSurvey Community Forum

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

Specific condition of a subquestion..

  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224717 by eniisula
Specific condition of a subquestion.. was created by eniisula
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Theme:

==================
I have multiple numerical inputs, but I want one of them not to exceed 49? How can I do this? 
Thank you in advance!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 3 months ago - 3 years 3 months ago #224725 by DenisChenu
Replied by DenisChenu on topic Specific condition of a subquestion..
www.limesurvey.org/manual/Question_type_...28em_validation_q.29

Q00_SQ020.NAOK lt 49 OR is_empty(Q00_SQ020.NAOK)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 3 years 3 months ago by DenisChenu.
The topic has been locked.
  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224728 by eniisula
Replied by eniisula on topic Specific condition of a subquestion..
I tried implementing the code in question validation equation but it does not seem to work. Since this is my first time working with limesurvey code could you tell me where to implement it and how?
Thank you!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #224736 by Joffm
Replied by Joffm on topic Specific condition of a subquestion..
The place "question validation equation" is correct.

I hope you adapted the code to your design.

Anyway: Without seeing what you did, it is hard to help.
So please, show how you edited the subquestions, and the entry in the validation. (screenshot)

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224737 by eniisula
Replied by eniisula on topic Specific condition of a subquestion..
I tried putting like it was and just changed the codes to adapt it to my question but as you si it is not correct. This is all new to me. I hope I am not acting too dumb lol.
Attachments:
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 3 months ago #224738 by DenisChenu
Replied by DenisChenu on topic Specific condition of a subquestion..
Please : check the Question logic file and send a screenshot.

Here : you don't show your subquestion etc …

And put something in question validation equation tip : it's more clear when you test.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224739 by eniisula
Replied by eniisula on topic Specific condition of a subquestion..
What should I put on the 'Question validation tip'?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #224741 by Joffm
Replied by Joffm on topic Specific condition of a subquestion..

but as you si it is not correct. 

Why do you think it is not correct?
Because of the red underlining?
This only means it is not a correct English word. There is no English word "is_empty" (with underscore).

But what about your regex validation?

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224742 by eniisula
Replied by eniisula on topic Specific condition of a subquestion..
I mean it is not correct because it does not . I have put this /^[1-9][0-9]?$|^100$/ at general in the input validation.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 3 months ago #224743 by DenisChenu
Replied by DenisChenu on topic Specific condition of a subquestion..
> I mean it is not correct because it does not

How do you think it's not correct ?

About tip : just put anything to have a javascript reaction : to see if it's correct,when it's OK or not .

And WHY use regexp on numeric question …

Just put max value to 100 and min value to 0.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: eniisula
The topic has been locked.
  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224749 by eniisula
Replied by eniisula on topic Specific condition of a subquestion..
Thank you it worked now! I just couldn't display the message properly on the tip.

{if((G1Q00009_3.NAOK lt 50 OR is_empty(G1Q00009_3.NAOK)),', 'NUK ËSHTË E MUNDUR TË VENDOSET NJË NUMËR MË I MADH SE 49.<br/>')}

I placed the above code on Question validation tip and the whole code is displayed on the question not only the sentence I want to.
The topic has been locked.
  • eniisula
  • eniisula's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #224751 by eniisula
Replied by eniisula on topic Specific condition of a subquestion..
I also fixed the tip. Thank you all for your feedback.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose