- Posts: 10261
- Thank you received: 3648
Ask the community, share ideas, and connect with other LimeSurvey users!
lintu wrote: P.S. Joffm - I exported the survey excel file as you suggested, but my custom code is not in there for me to remove as I inserted it in the template.
Based on your test survey, something like this should qork:I am displaying an image on top of the answer selections (see screenshot below) for every question. Since I have over 100+ questions, instead of adding this to each answer, I inserted my code in the question.pstpl template. Now, for select questions, I want to hide this based on the question # or question code.
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var q = '{QUESTION_CODE}'; if (q == 'Q1') { // Hide the images table $('.no-more-tables-array-dual').prevAll('center:eq(0)').hide; } else { // Do nothing } }); </script>
<CENTER> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD ALIGN=CENTER><img id="customimage1" src="images/current_state.jpg"></TD> </TD> </TABLE></CENTER> <script> var q = '{QUESTION_CODE}'; if (q == 'q1') { //Hide the image for this question document.getElementById("customimage1").style.display = 'none'; } </script>