Monday, November 2, 2015

Add dynamic class in limesurvey questions


Steps to add dynamic classes in limesurvey questions.

  1. Login to lime admin panel.
  2. Select survey from list.
  3. Select group in which your question exist.
  4. After selecting group question will be listed.
  5. From question list select in which you want to add dynamic class.
  6. After selecting question click on " edit current question" from question tool bar.
  7. It will look like below.

 8. Click on source in question edit tool bars (Array type question is here dummy question text ).
 9. After clicking on source it will look like below image.


 10. After question paste the below given script.

<script type="text/javascript" charset="utf-8">


        $(document).ready(function(){ 
$('#question{QID}').addClass('hello');
});


</script>

11. After pasting it will look like


12. After paste again click on source to back normal view and save .
13. No more steps done.

Enjoy.