Hide "other text" box from other option in constant sum table | XM Community
Skip to main content

I have a constant sum table where the last option is an “Other” option with an other text option.

 

How can I hide this when then input value for the “other” option is 0 or empty, and also force a response when other is greater than 0? Is this even possible? 

 

I can manage to hide it by default when opening the page with getElementById, but I’ve no idea how to then show it once a value for other is provided and also hide it again if the other value is removed.

 

Thanks!

You can use custom validation to make sure the the text box isn’t empty if the value > 0 or empty if the value = 0.

For hiding/unhiding the text box, add a JS function to hide/unhide based the value of the input. Call the function from addOnload and from an input event handler on the the ‘other’ value field.


Leave a Reply