Set a field to be required through JS | XM Community
Skip to main content

How do you make a field required through JS? I have multi-select question where the option "Other" presents a text field (of the same question). I'd like to make that field required and use a custom message. Qualtrics has the "Custom Validation" field, which I can use to target that specifically, however, it's a lot more work if I have to conditionally choose every possible selection to validate vs. target directly through JS.

Hi there, while you could use JavaScript to create a fake Next button and validate survey answers on button click, I believe what you are describing is possible without JavaScript.
If you set up the Custom Validation to use multiple Logic Sets, the validation can be passed if the Choice is selected and the Field is not empty, or if the Choice is not selected, like in the below:
CustomValidationTextEntry.png


Leave a Reply