Open marcinkrzeminski opened 1 year ago
I noticed the same for radio and other fields where the return_format option can be provided. It always seems to return the default setting rather than the value provided. For a radio I tried setting it to both label and array, but it still returns just the value.
For example this radio:
->addRadio('language', ['return_format' => 'array'])
->setConfig('label', __('Language', 'deerns'))
->setConfig('return_format', 'array')
->setConfig('required', true)
->addChoices([
'nl' => __('Dutch', 'deerns'),
'en' => __('English', 'deerns'),
'fr' => __('French', 'deerns'),
'de' => __('German', 'deerns'),
'it' => __('Italian', 'deerns'),
'pt' => __('Portuguese', 'deerns'),
'es' => __('Spanish', 'deerns')
])```
as you can see I've tried setting the return_format in both the inline settings array as well as with the setConfig option, after trying them both separately, but they have no effect. The field only returns 'es' for example.
I tested Image and Radio fields and both are working fine. Can you please provide sample code how are you fetching the ACF field value?
Hi,
I have an image field added like this
As per docs, this should return a URL to the image. Unfortunately, I'm getting and ID in the response.
Any idea what could be wrong here?