Trying to make SOME but not all form items required | XM Community
Skip to main content
Solved

Trying to make SOME but not all form items required

  • February 14, 2019
  • 4 replies
  • 485 views

Forum|alt.badge.img+5
I have a form field with 9 different items. I need just a couple of them to be required. Does anyone know if this can be done with custom code? Thanks in advance!

Best answer by NiC

Hi You can use custom validation as in the image below to only make some form field mandatory. !
View original

4 replies

NiC
QPN Level 5 ●●●●●
Forum|alt.badge.img+27
  • QPN Level 5 ●●●●●
  • 255 replies
  • Answer
  • February 14, 2019
Hi You can use custom validation as in the image below to only make some form field mandatory. !

Forum|alt.badge.img+5
  • Author
  • Level 3 ●●●
  • 204 replies
  • February 14, 2019
I feel stupid for not figuring that one out. Thank you @NIC. On a separate note, I noticed many of my form fields wrap onto 2 lines and the text ends up looking really close together. Do you know if there is any way to add a bit of spacing inbetween each form line.

  • 0 replies
  • February 14, 2019
> @uhrxx005 said: > I feel stupid for not figuring that one out. Thank you @NIC. On a separate note, I noticed many of my form fields wrap onto 2 lines and the text ends up looking really close together. Do you know if there is any way to add a bit of spacing inbetween each form line. Paste the below code in the js(OnReady) of the form question type: `jQuery("#"+this.questionId+" .ChoiceStructure table").css("border-spacing", "10px 40px");`

Forum|alt.badge.img+5
  • Author
  • Level 3 ●●●
  • 204 replies
  • April 9, 2019
Just FYI, this is now even easier. Now by clicking "Click here to edit form fields" you will get an option to force response for each individual row.

Leave a Reply