is there a way ho to submit form created with acf_form
via ajax so it doesn’t redirect after submission?
This is the ACF form
acf_form_head();
acf_form(array(
'post_id' => 'new_post',
'form_attributes' => array('id' => 'acf_form_new_map'),
'new_post' => array(
'post_type' => 'tome_map',
'post_status' => 'publish'
),
'html_after_fields' => '<input type="hidden" name="form_type" value="new_map" />',
'form' => true,
'post_title' => true,
'fields' => array('field_54593ddcc6da5'),
'submit_value' => 'Save and insert new map',
'return' => ''
));
Thanks for your time.
Yes you can, assuming that you want to submit acf form on on button click without page refresh.