Form entries are posts under the hood. When storing entry posts, you may access the created entry ID in a custom submission handler as follows:
<?php add_action( 'af/form/submission', function ( $form, $field, $args ) { // If we need to run this only on a specific form, check for the form key. if ( $form['key'] !== 'form_5bfcef8b5a540' ) { return; } $entry_id = AF()->submission['entry'] ?? null; // Use the entry ID as needed here. }, 10, 3 );
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article