Change background color of text when other text fields are clicked

The “Overview” text field background is purple on page load. How can I set it up when one of the other text fields are clicked that text field background turns purple all other ones go white? So, basically the last text field clicked should be the one with the purple background. Thanks for your help in advance.

I do this using a custom state. You can create a custom state of type text, number, etc. I currently use type number as follows:

  1. I create a custom state of type number, with its default value as ‘1’
  2. I consider each tab left to right as having a sequential value (#1, #2, #3, #4)
  3. On each tab, setting a condition where when Custom State’s Value is # (# of tab), background color= purple.
  4. Create a workflow on each tab that when element is clicked, set State to (number of tab being clicked)

Now as a tab is clicked, the state is set to that number, and when the state is set they tab’s background color will change to purple.

That worked thank you!

1 Like