
Dynamic Inline Styles from ACF Fields for Repeater Divs in Oxygen
Tags:
Comments
9 responses to “Dynamic Inline Styles from ACF Fields for Repeater Divs in Oxygen”
-
Is there any way you can provide a snippet for the color picker sub_field that is in an ACF repeater?
-
If the Background Color field is inside a Repeater i.e., as a subfield, it can have multiple values per post.
Which value should be taken and applied as the post’s background color? The first one?
-
-
Hi Sridhar,
This worked great as used for a dynamic background color for the client to change for their sponsors CTA buttons. But I tried the same process for changing the text color of the button by creating a new snippet, applying the attribute to the button (which now had 2 style attributes which I think is the problem) and it overrode the background and was now only dynamically changing the text and the button color was back to default. Any chance you can pick out what I’m doing wrong? Thank you sir!
-
Do you want to set up both the dynamic properties i.e., Repeater Div background-color and button text or just the button text?
-
It’s actually button background color and button text. I’m going to PM you on FB with a link to the dev site. I got the button background color to pull through from an ACF color picker but not the button text color.
-
I updated the tutorial. Check the update near the end.
-
Thank you sir!!! You’re the best!!!
-
-
-
-
-
I’m new here and thank you for this great site! Looking forward to…saving time!
I have followed all the steps but I think my goal is a little different.
1. I have a ACF custom field called “vulnerability_status” displaying the vulnerability status.
Choices:
New
Open
In Progress
In Review
Under Review
Cancelled
Reopened
Done
Closed
Resolved
Completed2. I created a modal that is triggered by selecting the vulnerability status word so users can select another status from the list.
3. How can I change the DIV background based on user selection?
Example: vulnerability_status = “New” -> then I want the DIV background to be green. Same for vulnerability_status = “Closed” -> then I want the DIV background to be black.
Is it possible?
Thanks in advance-
Thanks for becoming a member Stephane.
Mind sharing the URL of the page that you have currently or perhaps a Loom screencast elaborating more?
Trying to properly understand the requirements.
-



Leave a Reply to squeak.media Cancel reply