Use the value of a relationship field in title
-
Hi,
I am trying to auto-generate titles for a CPT based on the concatenation of the value of a text field and the value of a relationship field.
However, I get an array for the relationship field, and even using acf_log() to print this to the debug log doesn’t show the structure of the array (so, I can try to dereference into it).
It doesn’t make any difference whether I choose Post Object or Post ID in the
Return Format
of the relationship field definition.I have seen these ACF help pages, but it’s not clear how I can use either filter described:
- https://www.advancedcustomfields.com/resources/acf-fields-relationship-result/
- https://www.advancedcustomfields.com/resources/acf-fields-relationship-query/
It’s noteworthy than when filling out the form, the relationship field displays a list of the values of the relationship field, from where a choice is made
- The topic ‘Use the value of a relationship field in title’ is closed to new replies.