Copy link to clipboard
Copied
I have a chart that people will fill out with custom text. However, not every box in the chart will be completed. What is the best way to have the text boxes that are completed change colors so they stand out once you click off of them? I can get the boxes to change color when you type into it but it won't stick once you click into another text box. I've tried various validation statements, but nothing seems to work. I'm at a loss. Do I need an if than statement? I'm not the best at JavaScript. Thanks in advance.
Copy link to clipboard
Copied
You can use On Blur event of text field.
Go to field properties -> action tab and select 'On Blur' -> 'Run a javascript' and add this code:
event.target.fillColor = color.blue;
Change color if you wish, I just used blue as an example.
Copy link to clipboard
Copied
Thanks! That worked, but when I click out of the cell the color disappears. Do you know of a way to make the color stay when you click off of it?
Copy link to clipboard
Copied
Thats because you have turned on field highlight, you can turn it off in preferences
but it won't work for other users, because they need to turn it off also in their software.
Copy link to clipboard
Copied
Thank you! I didn't know that was possible! Thanks so much for the tip! You're a life saver 🙂