Browsing responses

5 years 8 months ago - 5 years 8 months ago #74535 by tpartner
tpartner replied the topic: Aw: Browsing responses

Can i somehow list survey id's in the code that tpartner made before so i get the same action to other surveys aswell?

You can wrap the code in a function and then call it with the survey IDs followed by the columns to hide (all comma-separated).

The following example will hide two columns for surveys 13829 and 12269 and hide 4 columns for survey 66653.
	function hideColumns() {
		var sID = arguments[0];
		if($('input[name="sid"]').attr('value') == sID) {
			// Add some column-specific classes
			$('.browsetable tr').each(function(i, el){
				$('> *', this).each(function(i, el){ 
			// Create an array of columns to hide
			var hiddenColumns = new Array();
			$(arguments).each(function(i, arg){
				if(i > 0) {
			// Loop through the hiddenColumns and hide them

Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 8 months ago by tpartner.
The following user(s) said Thank You: tave

Please Log in to join the conversation.

5 years 8 months ago #74701 by tave
tave replied the topic: Browsing responses
Tpartner that is real magic thank you very much=) That works like a charm.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now