Home › Forums › Front-end Issues › Saving acf_form() via AJAX – maybe it can be done? › Reply To: Saving acf_form() via AJAX – maybe it can be done?
Thanks, I was able to hook acf_form_head into:
wp_localize_script( 'csm-csf', 'acf_form_head', array( 'ajaxurl' => admin_url( 'admin-ajax.php', 'http' ) ) ); add_action( 'wp_ajax_nopriv_acf_form_head', 'acf_form_head' ); add_action( 'wp_ajax_acf_form_head', 'acf_form_head' );
And pass it data via ajax and get a response. Looks like building out the data for basic form elements is easy enough, but repeater fields and select2 off screen fields are going to take some work.
But I’ll look at other links you provided. Thanks!
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.