Title: Conditional logic actions
Last modified: October 13, 2024

---

# Conditional logic actions

 *  Resolved [Begin](https://wordpress.org/support/users/bentalgad/)
 * (@bentalgad)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/conditional-logic-actions/)
 * Is it possible to set form action to be triggerd only on specific field condition?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * (@hwk-fr)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/conditional-logic-actions/#post-18112133)
 * Hello,
 * Thanks for the feedback!
 * You can prevent an action from being processed using the related “prepare” hook.
   For example, for the Post Action, you can use the`acfe/form/prepare_post` hook(
   [see documentation](https://www.acf-extended.com/features/modules/forms/actions/post#prepare)),
   and `return false` to stop the action, and go to the next one. You’ll find the
   same “prepare” hooks in other actions too.
 * Usage example:
 *     ```wp-block-code
       add_filter('acfe/form/prepare_post/form=my-form', 'my_post_prepare', 10, 2);function my_post_prepare($action, $form){        // if user isn't logged in    // do not create/update the post    // and go to the next action    if(!is_user_logged_in()){        return false;    }        // return normally    return $action;    }
       ```
   
 * Hoep it helps!
 * Have a nice day!
 * Regards.

Viewing 1 replies (of 1 total)

The topic ‘Conditional logic actions’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Konrad Chmielewski](https://wordpress.org/support/users/hwk-fr/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/conditional-logic-actions/#post-18112133)
 * Status: resolved