Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Feature Request: Return Value as set in ACF - value, label, or both (Array) #44

Closed
heyfletch opened this issue Aug 13, 2019 · 3 comments

Comments

@heyfletch
Copy link

Was recently getting an array from a radio field. GraphQL returned the values as expected. But ACF has a setting to Return Value with options Value, Label, or Both (Array). Having the ability to return the Label would have facilitated my data needs.

Screenshot for reference:

image

@jasonbahl jasonbahl added the enhancement New feature or request label Feb 24, 2020
@stephanedemotte
Copy link

stephanedemotte commented May 7, 2020

any news about that ? 👯

Small hack before the fix

add_filter('graphql_acf_field_value', function ($value, $field, $root, $id) {
  if($field['key'] == 'MY_FIELD_KEY')
    return $field['choices'][$value];
  return $value;
}, 10, 4);

@ljanecek
Copy link
Contributor

Any progress with that, please?

@jasonbahl
Copy link
Contributor

👋🏻 we're re-building WPGraphQL for ACF over here: https://github.com/wp-graphql/wpgraphql-acf

I've created a new issue in that repo to track this feature request. See: wp-graphql/wpgraphql-acf#105

We'll be archiving this repo in the not-too-distant future, so I'm going to close this issue and we'll track this in the new repo.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants