Closed Juuso1 closed 9 months ago
Hello @Juuso1, You can use question values in HTML question content. To use values, wrap a question or calculated value's name with curly braces.
Please consider this demo:
{
"pages": [
{
"name": "page1",
"elements": [
{
"type": "dropdown",
"name": "question1",
"defaultValue": "red",
"choices": [
{
"value": "red",
"text": "Red"
},
{
"value": "orange",
"text": "Orange"
},
{
"value": "blue",
"text": "Blue"
}
]
},
{
"type": "html",
"name": "question2",
"html": "<span style='color:{question1}'><b>Hello World</b></span>"
}
]
}
]
}
Let me know if you have any further questions.
Thanks
Are you requesting a feature, reporting a bug or asking a question?
This is question how to change html table text color based on value in Surveyjs form? Custom function or expression?
What is the current behavior?
What is the expected behavior?
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
Specify your