How to get the value of a text box inside a container to update the container style based on the value of the text box?

Builder content link

Builder public api key

I have a container “Footer” that i’m trying to change the background color of based on the value of the text box that is inside this container. I’m having some difficulty understanding how to do this in builder using the element data binding. I’ve added a screenshot of the visual editor to show the layer container “Footer” that contains the text box which will either show a text of Register, Filled, Ended, or Cancelled. Based on the value of the text, that will determine the background color of the footer container.

Hi Dalia, try it like this :

return (state.$item.registerLabelText === "REGISTER" ? "#00B31B" : "#949494")

You have to use “return” or “export” to get the data binding to work properly. Hopefully that helps!