Home › Forums › General Issues › Looking to display 5 ACF fields' values in one field, while adding a post. › Reply To: Looking to display 5 ACF fields' values in one field, while adding a post.
Hi John,
Thanks for the reply. I am working on it, and can you take a look? Something is missing i think.
Also is $field[‘message’]
what i use to get the field to show on the page?
<?php
function my_acf_prepare_field( $field ) {
// Lock-in the value "Example".
// if( $field['value'] === 'Example' ) {
// $field['readonly'] = true;
// };
// return $field;
$buy_or_sell = get_field('buy_or_sell');
$pair = get_field('pair');
}
// Apply to fields named "example_field".
add_filter('acf/prepare_field/name=buy_or_sell', 'my_acf_prepare_field');
add_filter('acf/prepare_field/name=pair', 'my_acf_prepare_field');
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.