Change default value for smile slider | XM Community
Skip to main content

I am using smile slider in one of my question.

The default value is neutral. I would like to change it.

Is there any code I can use 

 

 

 I browsed through few questions here and found that this was raised as product idea about 3 years ago 

 

We can use the below code in addOnReady function for graphic slider smile question type to set custom default value of slider. Here default value simply means what the respondent will see first time; they have to still click on slider to record response.

	var defvalue = 5;
var that = this;
setTimeout(function(){
jQuery("#"+that.questionId+" .Smile").css("display","none");
jQuery("#"+that.questionId+" .Smile.SS"+defvalue).css("display","block");
jQuery("#"+that.questionId+" .handle").css("left",((defvalue-1)*45)+"px");
}, 10);

 


Many Thanks @Shashi for quick response.

Is there any repository where I can search for useful codes.



 


Many Thanks @Shashi for quick response.

Is there any repository where I can search for useful codes.



 

Not aware of any such one repository but you can refer this community section to get various code snippets.


Leave a Reply