Conditionally Setting a Question Label to Bold
Import Files | |
---|---|
Service Item | Bold Dynamically |
KURL | Bold Dynamically |
This article will walk through setting a label field text attributes to Bold based on the selection value of another question.
Description
We have field called "Software"
A field value of "Kinetic Calendar" is selected.
Based on that value -- we Bold and Require another question label.
How to set Required/Optional.
To accomplish this take the following steps:
- Open the "Software Question"
- Create an Event for "Change"
(You will have to do this twice -- once to set required and once to set optional)
How to set Bold/Normal.
- Open the "Kinetic Calendar License Key" question element.
- Click on the Advanced Tab and copy the Question InstanceID - KS00D0B7A9C485SDpbUQnAOCcAI5hH
- Open the "Software Question"
- Create an Event for "Change"
- Set the Action to "Custom". (This Event will set the Kinetic Calendar License Key to Bold font when the Software Question == "Kinetic Calendar".)
- Set the "Custom Code": (Use the Question InstanceID we copied previously) document.getElementById('SRVQSTN_KS00D0B7A9C485SDpbUQnAOCcAI5hH').parentNode.style.fontWeight = 'bold';
- Create another Event on the "Software Question" for "Change" (To undo the bold)
- Set the Action to "Custom". (This Event will set the Kinetic Calendar License Key to Normal font when the Software Question != "Kinetic Calendar".)
- Set the "Custom Code": (Use the Question InstanceID we copied previously) document.getElementById('SRVQSTN_KS00D0B7A9C485SDpbUQnAOCcAI5hH').parentNode.style.fontWeight = 'normal';
See attached "Bold Dynamically Service Item".