Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Show column header in text grid question: Difference between revisions

From Catglobe Wiki
Cg van (talk | contribs)
No edit summary
Cg van (talk | contribs)
 
Line 19: Line 19:
quest.onInit = function()
quest.onInit = function()
{
{
$("#grid_subquestion_text_1").parent().before($("<tr><th></th><th>Antal minutter</th></tr>"));
$("#grid_subquestion_text_1").parent().before($("<tr><th></th><th>Personal information</th></tr>"));
}
}
</source>
</source>

Latest revision as of 10:35, 2 February 2012

Challenge

In order to indicate the unit of values to be put inside a text grid question

As a questionnaire creator

I want to add headers to columns in text grid question

Example

Solution

  • Add a Text grid question to Questionnaire editor like below
  • Go to menu Properties -> Question scripts -> Java script tab -> Input script

Code

quest.onInit = function()
{
	$("#grid_subquestion_text_1").parent().before($("<tr><th></th><th>Personal information</th></tr>"));
}

Source

Questionnaire Resource Id on cg site: 159730