Is there a way to have “optional” in a dithered box (or something similar) within the text box and then it would disappear as soon as the recipient starts typing?
I know the other option would be to just state (optional) after the question - wanting to know if there’s a way to display it within the actual text box.
Page 1 / 1
Hello @kgillis ,
Adding the text "(Optional)" directly into the Survey Question itself would simplify the process. You can utilize default choices to keep this static text visible even as the survey begins. Customers have the option to remove the text using the back key on the keyboard if they desire. Alternatively, employing JavaScript allows you to write code and incorporate it into your survey for achieving the same outcome.
Hi @kgillis ,
You can add below JS code to your question to achieve the same :
Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/
Qualtrics.SurveyEngine.addOnUnload(function() { /*Place your JavaScript here to run when the page is unloaded*/
});
Hope this resolves your query!!
@qualtrics_nerd
I entered the JS exactly as you posted (*this also has fueled me to learn JS)
But I am not seeing the “optional” in the text box show up as anticipated
@qualtrics_nerd
This code works great for Single Line text entry boxes! Thank you. How would I change the JS code so that it works on Multiple Lines and Essay Text box types?