Hi, is the acf_form_head() function called before any HTML output? As explained in the docs, the acf_form_head() function is used to process, validate and save the submitted form data created by the acf_form() function. It will also enqueue all ACF related scripts and styles for the form to display correctly.
This function must be placed before any HTML has been output, preferably above the get_header() function of your theme file.
Yes it was there, finally decided to do it differently having only <?php acf_form(‘new-message’); ?> in my template and the acf_register_form() in functions.php using hook add_action(‘acf/init’, ‘my_acf_init’);
Seem that having the acf_register_form() directly in the template doesn’t work anymore in last acf version.
Viewing 3 posts - 1 through 3 (of 3 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