- Posts: 16
- Thank you received: 3
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8_general_ci"> $(document).ready(function(){ $('#question{QID}').addClass('Potatoes'); // "Potatoes" would be the question code for this particular question }); </script>
<div {QUESTION_ESSENTIALS} class="question-wrapper {QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}{if(!is_empty(QUESTION_CODE),' question-code-'+QUESTION_CODE, '')}">
<script type="text/javascript" charset="utf-8_general_ci"> $(document).ready(function(){ $('#question{QID}').addClass('{QUESTION_CODE}'); }); </script>
<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS} {QUESTION_CODE}">
tpartner wrote: I don't understand using JavaScript here - that will require inserting in all questions, all languages. Modifying question.pstpl will automatically handle that.
Think it's better to use question.pstpl too :whistle: but i leave less advice than Tonyclass="{QUESTION_CODE} {MANDATORY_CLASS}....