Conditionally show fields based on multi-select

Hi, I am currently trying to conditionally show the 'Tell Us More' field below if 'Other' is selected in the multi-select field. I have written some code based on another blog post which seems to work, but only when at least one item is submitted. In turn, it doesn't work if the user is seeing the page for the first time until they select an option.

Please see the code below:
image

Thank you so much for your help!

Hello @ProfessorProton12 ,
it may be due to the code on line 88?

When you load the Form and call the function, it is called, but still waiting on change. Have you thought about it or is it a purpose?

Hi Stepan,

I see what you mean, and yes, the purpose of that code is for the formatting to still work when the 'Other' option is selected and deselected.

I need a way to be able to have this functionality, while it also hiding the 'TellUsMoreField' before the user selects an option.

Does this make sense?

Thank you.

Dear @ProfessorProton12,
As @StepanS has correctly pointed out, you don't need to run the same change twice, it prevents the code from running on form load. If you can copy and paste the code here, we can help you correct it to run on form load.

1 Like