What would the JS code be to add a character limit to a matrix constant sum table | XM Community
Skip to main content
Solved

What would the JS code be to add a character limit to a matrix constant sum table

  • June 4, 2021
  • 2 replies
  • 13 views

Forum|alt.badge.img+3

Hi,
I'm trying to add a character limit to a matrix constant sum table. I'm using
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery("#"+this.questionId+" .InputText").each(function () { 
  jQuery(this).on("input", function() { this.value = this.value.substr(0,15); });
});
});
But it doesnt work for Matrix tables.

Thanks
Mark

Best answer by rondev

Instead of .InputText, we have to specify the td class with "input[type='text']"

2 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • June 5, 2021

Instead of .InputText, we have to specify the td class with "input[type='text']"


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • June 7, 2021

Thank you rondev!