Title: ACFE Button non-ajax hook/usage?
Last modified: November 12, 2020

---

# ACFE Button non-ajax hook/usage?

 *  Resolved [devtat](https://wordpress.org/support/users/devtat/)
 * (@devtat)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/acfe-button-non-ajax-hook-usage/)
 * I’ve added Buttons with the Ajax-enabled hooks, like ‘acfe/fields/button/name
   =action_1’, but how do I actually run my custom functions without making an Ajax
   call?
 * The documentation says “the button will natively submit the current form”, which
   doesn’t really tell me anything, like:
    – How are these values sent/accessed?(
   I just need the post_id and button name) – Can I still hook specific actions 
   to different Buttons in a non-Ajax submissions? – Does the Button type (button
   |submit) matter? etc.
 * My main issue is that I’m modifying the Post Status of the post the Buttons are
   attached to, so I need the post to be refreshed/redirected after a Button is 
   clicked.

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

 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/acfe-button-non-ajax-hook-usage/#post-13653742)
 * Hello,
 * Thanks for the feedback! The post edit screen in the WordPress admin area is 
   one big `<form>...</form>` tag. All WordPress post settings and ACF fields are
   rendered inside that tag, which includes the ACF Extended button field. In HTML,
   any `<button></button>` or `<input type="submit" />` tags will submit the current
   form on click.
 * In the post edit screen of WordPress that means the general form will be submitted,
   which is basically the same as if the user clicked the primary “Update” button
   on the top right corner. This will trigger all WordPress submission logic (hooks,
   filters etc…), and also ACF submission logic (since there are ACF fields in the
   form).
 * So you can use any WordPress submission hook (See this [Stackoverflow answer](https://wordpress.stackexchange.com/questions/134664/what-is-correct-way-to-hook-when-update-post/134667#134667)),
   or the `acf/save_post` hook which handle all post edit submission logic, to add
   your own logic. See documentation: [https://www.advancedcustomfields.com/resources/acf-save_post/](https://www.advancedcustomfields.com/resources/acf-save_post/)
 * Hope it helps!
 * Regards.
 *  Thread Starter [devtat](https://wordpress.org/support/users/devtat/)
 * (@devtat)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/acfe-button-non-ajax-hook-usage/#post-13657161)
 * Thanks! 🙂
 * I ended up having to hook into both `'acf/save_post'` and `'acf/pending_post'`,
   and switch to a normal select dropdown to cover the many different actions I 
   wanted there.
 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/acfe-button-non-ajax-hook-usage/#post-13671888)
 * Hello,
 * I’m glad to hear that you made it works! Please note that the `acf/pending_post`
   hook doesn’t exists tho.
 * Have a nice day!
 * Regards.

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

The topic ‘ACFE Button non-ajax hook/usage?’ is closed to new replies.

 * ![](https://ps.w.org/acf-extended/assets/icon-256x256.png?rev=2071550)
 * [Advanced Custom Fields: Extended](https://wordpress.org/plugins/acf-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-extended/reviews/)

## Tags

 * [acfe](https://wordpress.org/support/topic-tag/acfe/)
 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [button](https://wordpress.org/support/topic-tag/button/)

 * 3 replies
 * 2 participants
 * Last reply from: [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/acfe-button-non-ajax-hook-usage/#post-13671888)
 * Status: resolved