- Posts: 222
- Thank you received: 10
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Adding text to table cells in arrays
- krosser
- Topic Author
- Offline
- Elite Member
Less
More
4 years 11 months ago #183907
by krosser
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Adding text to table cells in arrays was created by krosser
Hi guys!
I would like to add text to the first cell in the heading of an array. Any help would be much appreciated.
Sample survey attached:
I would like to add text to the first cell in the heading of an array. Any help would be much appreciated.
Sample survey attached:
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
4 years 11 months ago #183946
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Adding text to table cells in arrays
Place something like this in the question source:
And maybe something like this in custom.css:
Sample survey attached:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Insert header text var insertedText = "Inserted text"; $('table.subquestion-list thead tr:last td:first', thisQuestion).addClass('inserted-header').append(insertedText); }); </script>
And maybe something like this in custom.css:
Code:
td.inserted-header { font-weight: bold; text-align: center; vertical-align: middle !important; }
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: krosser
The topic has been locked.
- krosser
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 222
- Thank you received: 10
4 years 11 months ago #183952
by krosser
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Replied by krosser on topic Adding text to table cells in arrays
Awesome! Many thanks, Tony.
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The topic has been locked.