Home › Forums › General Issues › Code Field / Return value of another custom field in post edit › Reply To: Code Field / Return value of another custom field in post edit
Even a field that allows code to be entered will not run that code. It is something you need to build. To run PHP code that is stored in a field you would need to use PHP eval() https://www.php.net/manual/en/function.eval.php to run the code in the script. This would need to be done using an acf/format_value filter. https://www.advancedcustomfields.com/resources/acf-format_value/. This is considered unsafe.
To alter a message field to show a value from another page you could create an acf/prepare_field filter for the message field and you can get the value and alter the message.
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.