Skip to content

Instantly share code, notes, and snippets.

@MjHead
Created February 2, 2024 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MjHead/e264aebc5f02b8785df44877d635a177 to your computer and use it in GitHub Desktop.
Save MjHead/e264aebc5f02b8785df44877d635a177 to your computer and use it in GitHub Desktop.
JetFormBuilder. Add custom unique ID to request.
<?php
add_action( 'jet-form-builder/custom-action/iterate-submissions', function( $request, $action_handler ) {
$uid = get_option( '_my_uid', false );
if ( ! $uid ) {
$uid = 1;
}
jet_fb_context()->update_request( $uid, '_uid' );
$uid++;
update_option( '_my_uid', $uid );
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment