Trying to customise the formatting on a matrix table | XM Community
Skip to main content

I've got a matrix table that looks like this:
matrix-table-CURRENT.PNGWhat JavaScript could I apply so that the table looks more like:
matrix-table-WOULD LIKE.PNGIs this possible?

Hi MikeW

Could you share your question type and parameters ?
It's gonna be easier to try it we have the same base.

In your example, It seems that yyy and zzz are labels and you want to disable the inputs, right ?



Hi ElieD - it's a Matrix question (constant sum).
I've put yyy and zzz in as default choices, but I want to format them so they don't look like question boxes any more. And, then make them read only.
Hope that helps? Do you need any more information?
Many thanks
Mike


I'm not sure the matrix and javascript is the right solution because you can't put text in a constant sum matrix.
Your defauld "yyy" is replaced with "0. in the preview.

Anyway, here is a piece of code to disable some parts of the matrix:
image.pngYou'll have to identify the boxes you want to disable by their position (row/column)
In my case, row 1 and column 11 for yyy (cause I modify the question many times !)


Hi ElieD
You are right - Matrix Constant Sum question isn't great as even though it displays... the text answers aren't valid responses.
I can change it to text boxes, but then I would need to create a total row and sum the entered figures?


Why don't you make 2 questions ?
One for aaa-ddd and another one for yyy-zzz.

You could have your 2 Matrix Constant Sum questions in the same page.


I might have to resort to that, but was trying to do it as one combined question.... though I appreciate that it is tricky.


Leave a Reply