I’ve got a component where I want the background color to change based on the results of an ACF select field - but the component will be used for multiple, different fields.
So I need to:
- specify the field name to use in the property, then
- use that field name to retrieve the background color.
For example, say that I’ve got an ACF field called “goals” and another called “budget”.
I create the component.
I type “goals” in one of the properties fields.
Based on that, the component uses the value of the field to add color to the background.
Any ideas how to achieve that?