Support

Account

Home Forums Feature Requests acf_form() on the front end

Solving

acf_form() on the front end

  • I would like to see an “acf_front_end_forms() function that would do all of the necessary setup and hooks for calling acf_form() on the front end.

    And/Or provide some kind of settings option that enables front end forms site wide.

    I think there is enough of a demand for it.

    Thanks!

  • +1. Never thought of this, but it would be great to have.

  • WordPress fires the get_header action before getting the header file, so you can enable acf forms on the entire site by doing something like this.

    
    add_action('get_header', 'site_wide_acf_forms');
    function site_wide_acf_forms() {
      acf_form_head();
    }
    

    You could add checks to only call acf_form_head() on certain templates or other conditions.

    As far as calling acf_form() in the templates where you want the to show, I don’t think there’s anything that ACF can to about that. There aren’t any hooks build into WP that fire in the template again until you get to get_footer();

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘acf_form() on the front end’ is closed to new replies.