Support

Account

Home Forums General Issues Auto generate post_title with acf_form Reply To: Auto generate post_title with acf_form

  • I’m not sure of all of the details of the title_save_pre hook. If it is firing for acf_form() saves then most likely the global $post has no value. You will also not have a way to get the post or post ID in this function since the value of the $_POST post ID will likely be new_post.

    It is always best to use the acf/save_post hook when dealing with ACF, front end or back https://www.advancedcustomfields.com/resources/acf-save_post/

    You could also create your own acf/pre_save_post for the front end https://www.advancedcustomfields.com/resources/acf-pre_save_post/

  • 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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.