Custom Action get generated ID
-
Hi hwk-fr!
I’m using a custom action and would like to fire on submission (just after) so I am using this hook:
add_action(‘acfe/form/submit/my-custom-action’, ‘my_form_custom_action’, 10, 2);
I want to use this hook on mulitple forms, thats why i was trying to use the same custom action for all my forms.
I need to get the “Generated ID” that’s created in the SAVE tab (i’m using for post title) of the Post Action. For the life of me i am not sure how to get it.
I’ve tried:
get_field(‘post_title’)
get_query_var(‘post_title’)
get_the_title( $post_id ) – brings back the form/page title, not the newly created postI also need the permalink and terms of the newly created page
Please could you point me the right direction?
Thanks as always!
- The topic ‘Custom Action get generated ID’ is closed to new replies.