“The problem is that acf_form is also echoing when called in the PHP file. You can either look for an alternate function (is there something like get_acf_form that returns the HTML but doesn’t echo?) OR use Timber’s output buffer wrapper:
$contect[‘vf_form’] = Timber\Helper::ob_function(‘acf_form’, $new_post);
… this will store the data in the vf_form attribute, but not suppress it from echoing until called in Twig”
So my question is, is there a method like get_acf_form that returns the HTML but doesn’t echo?
Thanks. I’m now trying to figure out how to uplaod files directly to Amazon S3. I built a prototype in node.js (its whats I know). PHP / wordpress is total new to me (hence using Timber – as it’s more in line with what I know). I built my first wordpress site last week. Glad I stumbled upon ACF 🙂
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users