Remove zeros from matrix table user view | XM Community
Skip to main content
Solved

Remove zeros from matrix table user view


Hi all! Is there a way to remove the zeros from the user's view of a matrix table? I have a large(ish) constant sum matrix table as I'm collecting workforce demographic data and a whole load of zeros looks quite overwhelming on the screen. Is there a way to have the input cells as blank boxes? Thanks :) Rose

Best answer by Anonymous

Hello @rose_b , This can be achieved through java script. 1. Get the id of the input box- In the preview mode of the question, do inspect element(ctrl+shift+C for chrome) and get the id of the input box (marked with arrow). As shown in the below image! 2. Go to the add java script option of the constant sum matrix question and add the following line in the on load function : document.getElementById('QR~QID9~1').value=""; 3. Repeat step step 1 and 2 for every input box. see the image below ! 4. Once this is done you will see blank input options as shown in the below image ! Please let me know if you have any problem in implementing this.
View original

6 replies

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 7, 2018
@rose_b when you click on gear icon on left there is option "add default choices" there change 0 with one blank " ". It will solve.

  • 0 replies
  • Answer
  • August 7, 2018
Hello @rose_b , This can be achieved through java script. 1. Get the id of the input box- In the preview mode of the question, do inspect element(ctrl+shift+C for chrome) and get the id of the input box (marked with arrow). As shown in the below image! 2. Go to the add java script option of the constant sum matrix question and add the following line in the on load function : document.getElementById('QR~QID9~1').value=""; 3. Repeat step step 1 and 2 for every input box. see the image below ! 4. Once this is done you will see blank input options as shown in the below image ! Please let me know if you have any problem in implementing this.

  • Author
  • 4 replies
  • August 7, 2018
Thanks @Shashi :) That did the job. @bansalpeeyush29 - when I tried your solution it showed the " " in the response box - I may have been doing something incorrectly though!? Thanks both :) Rose

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 7, 2018
@rose_b only blank space no quotes" :)

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5923 replies
  • August 7, 2018
@rose_b, While the solution given by @Shashi works, that is really the hard way. The following is one line and you don't have to look anything up. ``` Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId+" td input[type=text]").val(""); }); ```

  • Author
  • 4 replies
  • August 7, 2018
Thanks @TomG - that's brilliant!

Leave a Reply