Home › Forums › Feature Requests › Options page input used as field label for other custom fields › Reply To: Options page input used as field label for other custom fields
Yes, you would need to create a unique filter for each field. Of you can make the decision base on the field.
You can run your filter on every field, or a specific field as explained in the document I linked to above.
ACF passes the current field values to your function in $field
function set_my_field_label($field) {
This will have the field name, field key, and all the other information about the field. If you want to see what you have to work with add
echo '<pre>'; print_r($field); echo '</pre>';
to the top of your filter, I think this is also explained in the documentation. This will output all of the field values. You can then base what field you get from the options page on one of the field values, like the name.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.