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.
Thanks again John. I’m almost there..
This is my code made from your last post:
// get some values from Trade Alert Post, and put them in a message field for Jen to copy and paste into email / Jilt (/ eventually MailChimp maybe)÷
add_filter('acf/prepair_field/name=MESSAGE_FIELD_NAME', 'change_message_MESSAGE_FIELD_NAME');
function change_message_MESSAGE_FIELD_NAME($field) {
$pair = get_field('pair');
$buy_or_sell = get_field('buy_or_sell');
$field['message'] = ($pair.' '.$buy_or_sell);
return $field;
}
And i made another field a WYSWYG with a default value of [acf field="MESSAGE_FIELD_NAME"]
thinking after post saves and refreshes, it would get the value, but no go. How would i display the $field
from above?
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!
ACF PRO’s Flexible Content field allows you to create smaller pieces of UI and compose them into whole flexible patterns. In our latest article, we show how to use it to create swappable site sections and integrate it all in a theme.https://t.co/ZRocH8oJSp
— Advanced Custom Fields (@wp_acf) January 24, 2023
© 2023 Advanced Custom Fields.
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.