Force Response with Custom Validation | XM Community
Solved

Force Response with Custom Validation


Badge +2
  • Level 2 ●●
  • 17 replies

Hello

Can someone help me with my problem:
I have a survey, where I have to force the respondent to leave a comment if in another question he made a score of 6 or less....
I did the following but it doesn't work:
To the Q which is a comment, I put Force Response and added the custom validations

 

I also tried to check Request Reply and with those custom validations, but it doesn't work either…

Thanks

icon

Best answer by Sachin Nandikol 6 June 2024, 17:09

View original

8 replies

Userlevel 6
Badge +22

Hello @Aine,

Try this: Copy your 'Text Entry' question. For one copy, add display logic for ‘if 1 to 6 is selected' and enable force response for this question. For the copied question, set display logic to ‘if 7 to 10 is selected' and do not enable force response. This way if a customer selects 1-6, they will see the open ended question and it will be mandatory for them to answer. If they select 7-10, they will see the other open ended question but it will be optional for them to answer.

Let me know if this helps.

Badge +2

Hello @Sachin Nandikol 

Ahhh thanks for your proposal, the thing is that the question ‘Comment’ should always appear to the client, only it should be mandatory for when the Q1 has a score <= 6 and it should be optional when the Q1 has a score > 6. 
I make myself clear?

 

Userlevel 6
Badge +22

Hello @Aine,

I understand your requirement. The proposed suggestion will always display the ‘Comment’ question to everyone. Just try the steps once, as soon as they select any choice from 1-10, the sub-question (Comment) will appear for them. 

If you prefer not to use this method, another workaround would be to add ‘Validation’ to your ‘Open Ended’ question as shown in the screenshot below:

 

Try this validation once and let me know if this helps.

Badge +2

Perfect I already did what you indicated me ... and it works for the score greater than 6 ... but it does not work for those under 6, as it does not let me advance if I dodge something in the comment ... look 

 

 

now I ask you with Add Requirements should I enable or disable it?
Should I leave Force Response or Request Response or neither of them?

Userlevel 6
Badge +22

Disable the ‘Force Response’ and only keep the validation logic. Also move that last logic line to ‘Another set’ as i did in my screenshot. Once you make these changes try again.

Badge +2

Great … @Sachin Nandikol  I've already moved the last logical line to ‘Another set’. 
and in Add Requirements I disabled it...
But it still works fine for scores over 7, but for scores under 7, it asks me to complete the Comment, and when I complete it, it doesn't let me continue…

As you can see I answer, in ‘Comments’ I press the next button, and the error still appears and it doesn't let me continue.

 

 

Badge +2

“Hello, try my first suggestion itself along with ‘In page’ enabled. Validation will not work for you. If you’re good with javascrips you can try that once. If not try first suggestion of adding display logic”

 

Ahhhh great @Sachin Nandikol ... that option if it worked okey milll graciass
and thanks for the patience

 

 

Badge +2

Hello @Sachin Nandikol 

I ask you a question, do you have any example of how you could do with javascript, that this comment is not mandatory when the first question has a score <= 6...

Thanks

Leave a Reply