• I am still developing my site. I am using your plugin to allow a user to Add a new post.
    I want to run some PHP code after the user hits submit to add the new post. The PHP code will write data to a single ACF field of my post but only if the user hits the submit (adding New Post). Is there a way put a hook into your code to run the PHP code snippet after your Submit function has validated everything and before it closed the form object? Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Shabti Kaplan

    (@shabti)

    This is for before the data is saved in the DB:

    add_action( 'acfef/on_submit', function( $widget_settings, $widget_id ){ 
      //do stuff here
    }, 10, 2 );

    And this after it is saved

    add_action( 'acfef/after_save', function( $widget_settings, $widget_id ){ 
      //do stuff here
    }, 10, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Code after Submit’ is closed to new replies.