0

Using SharePoint 2010 survey and have a requirement to change the rating number range from 1-5 to 5-1 when it is displayed in the survey

1

you need java script to get this done: here is sample script, you have to modified it,

<script type="text/javascript">
var tables = document.getElementsByTagName('table');
for (var i=0; i<tables.length; i++)
{
if (tables[i].summary == 'Rating Scale Question')
{
var trs = tables[i].getElementsByTagName('tr'); 
var tds = trs[0].getElementsByTagName('td'); 
tds[2].colSpan = 1;
tds[2].innerHTML = 'your range text';
tds[3].colSpan = 1;
tds[3].innerHTML = 'your range text';
tds[4].colSpan = 1;
tds[4].innerHTML = 'your range text';
tds[5].colSpan = 1;
tds[5].innerHTML = 'your range text'; 
tds[6].colSpan = 1;
tds[6].innerHTML = 'your range text'; 
}
}
</script>

http://social.technet.microsoft.com/Forums/sharepoint/en-US/dd6fa536-0cd8-4985-9926-f5a695adbbce/add-new-rating-scale-text-fields-in-sharepoint-survey?forum=sharepointgeneralprevious

| improve this answer | |
0

I have modified above javascript as below

var tables = document.getElementsByTagName('table');
for (var i=0; i<tables.length; i++)
{
if (tables[i].summary == 'Rating Scale Question')
{
var trs = tables[i].getElementsByTagName('tr'); 
var ths= trs[1].getElementsByTagName('th');
ths[0].colSpan = 1;
ths[0].innerHTML='5';
ths[1].colSpan = 1;
ths[1].innerHTML='4';
ths[2].colSpan = 1;
ths[2].innerHTML='3';
ths[3].colSpan = 1;
ths[3].innerHTML='2';
ths[4].colSpan = 1;
ths[4].innerHTML='1';
}
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.