Bricks Version: in stable 1.4.0.2 also in beta 1.5 Browser: Shouldn’t matter OS: Shouldn’t matter
When using ACF fields dynamic data for a field that supports “value : label” choices the output is always the label even when “Return Format” is set to “Value”.
This happens for all the choice fields:
Select
Checkbox
Radio button
Button group
This happens for both:
single page specific fields
fields of items returned in query loop
This happens no matter what is set in the “Return Format” setting.
It ISN’T a problem with ACF itself as get_field() works fine for these fields.
So it seems like this is a global bug in the Bricks.
Possible solutions:
Add filters that work with ACF, like :value, :label, :array.
Make Bricks respect the ACF field “Return Format” setting. (Better choice if you ask me)
Bricks was always returning the choice label, but we agree that if the user selects to return the value in the ACF field configuration, then Bricks should retrieve the value and not the label. For the option “both (array)” Bricks will continue to return the label.
What about the possibility to show any other field from the post_object or if I choose to return post_id / term_id (in case of picking taxonomy in ACF) it always return label of the picked item?
For example:
I have customPostType where I want to put slider with related WooCommerce product related by productCategoryID (term_id) is it possible?
Is it on the list to allow returning the value when ACF Field is set to return “Both (Array)”?
It makes no sense to not allow returning the value using “:value” when using “Both (Array)” considering using Both is a necessity in many situations as is the need to return the value when using both.
No, that is not planned so far. However, if we receive more requests about it, we will certainly take up the topic again. However, you could write your own little helper function that returns the array and output the values using {echo:yourFunction}.
I want to say it’s not ideal, and technically it’s not, but this is such an easy solution. I continue to be impressed by the dynamic functionality of Bricks