- Posts: 17
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
If you are using ExpressionScript to set the question, you should also be able to use ExpressionScript to define a CSS class for the question.However, I also need to style the target questions so that it’s clear that they have been auto-answered (eg. having a green background and a hint-text).
Please Log in to join the conversation.
Please Log in to join the conversation.
I think, Tony wanted to say:Do you mean that it's possible to set a css class of another question via the logic field of an equation question?
Please Log in to join the conversation.
Thanks for clarifying this, it worked well. I am attaching an example survey, in case anyone needs to have a look.I think, Tony wanted to say:
"In the field "css classes" of this question enter something like {if(yourCondition,"autoAnsweredClass","")}
Let's take it step-by-step:Regarding the second:
What do you "compose"? In "Access to variables" there is a property ".sgqa"
Please Log in to join the conversation.
Maybe it's related to the session.Why would an answer field appear empty, if an answer is set to it programmatically in a previous question group (using the update_response API-function)?
Please Log in to join the conversation.
<div class="conditional-text alert alert-warning alert-dismissible" role="alert"> <button aria-label="Close" class="close" data-dismiss="alert" type="button"> <span aria-hidden="true">×</span> </button> This question was auto-answered </div>
<style type="text/css"> /* 1. To show the alert and change background and color of the answer */ .show-alert .form-control { background-color:yellow; color: red; } /* 2. To hide the alert */ .no-alert .alert { display:none; } </style>
Please Log in to join the conversation.
Please Log in to join the conversation.
I am really not informed here, how this can be related to the session (do you mean a caching issue?).
Maybe it's related to the session.Why would an answer field appear empty, if an answer is set to it programmatically in a previous question group (using the update_response API-function)?
But, why use the API to set the questions? Can't you do it with ExpressionScript in the previous page?
Please Log in to join the conversation.