I thought to myself that this is going to have to be a compound question. In the past I'd always avoided using compound questions for some reason. I remembered there being a bug once with other specify responses in compound questions not being saved in the database, perhaps this put me off!
I can use the 10 fingers as my loop driver, it doesn't look like I've got a choice this time, compound it is!
So I started setting up my metadata and when I was ready I pressed F5 to see how it looked. Actually not too bad, better than I expected but I've got to sort those headers out and try and lay the page out a bit better.
How do I do that? I've had plenty of experience of messing around with grids and using HTML and CSS in my templates to control my page layouts but no idea how to do this with a compound question.
Fortunately I found this wonderful thing called "labelstyle". You can do many things with "labelstyle", in this case I just needed it to vertically and horizontally align my column headers and specify the column widths. Just a few lines of code in my metadata here and there and you'll see the end result looks much better.
Feeling rather pleased with myself having cracked this and having learned something new, I turned the page of the questionnaire to find a whole load of logic instructions that needed to be applied to the grid. Many hours of trial and error, testing and 300 lines of validation code later, I got it working perfectly, the compound question layout had been the least of my worries!
Click here to see the metadata code that I used.
Hope you found this useful.Senior DP Consultant, Rebecca Cole works as a Senior DP consultant and heads up the Innovations Unit at Cobalt Sky