Change coded validation message for text entries in multiple choice | XM Community
Skip to main content
Hey guys!

So I'm working in a multiple choice question that has an open-ended "others" at the end. When a respondent selects the option but writes no text and tries to move forward, a validation message appears in english saying "Please answer this question". Is there any way to change this specific message? Its not in validation in the right hand corner because its for the "force response" for the text entry. I'm assuming it has to be coded. Can anyone help?
You can keep the question as "force response" but do not make the "Text entry" of other option as "force response". Instead, use "Custom Validation" and create a new message as you like. Below is the screen-shot for custom validation and attached is the qsf.



!
Hello @GabrielRibeiro ,



The following solution is using jquery:



Step 1: In the Text entry option do "force response" in "text entry validation" option as shown in the image!



Step 2: Now add Following js in the js( in on ready) option of the multi choice question.

`jQuery(".ValidationError.Sub.MC").html('Error');`



Step 3: Replace "Error" with your own message. You can also use html tags over there.

!
@Shashi can you check what happens if the question is "force response" and without answering anything click next?
> @Mohammedali_Rajapakar_Ugam said:

> @Shashi can you check what happens if the question is "force response" and without answering anything click next?



Thanks!! @Mohammedali_Rajapakar_Ugam updated the answer accordingly. Please let me know if still there is some error.

Leave a Reply