Hi @szilveszterg,
Unfortunately, there isn’t any out of the box setting to add submissions ID to the export.
You can achieve this using a Hidden field and by implementing the following custom snippet:
<?php
add_action( 'plugins_loaded', 'wpmudev_forminator_add_entry_id_to_hidden_field_func', 100 );
function wpmudev_forminator_add_entry_id_to_hidden_field_func() {
if ( defined('FORMINATOR_PRO') && class_exists( 'Forminator' ) ) {
class wpmudev_forminator_add_entry_id_to_hidden_field_func{
private $form_id = 63;//enter form_id here
private $entry_id;
public function __construct(){
add_action( 'forminator_custom_form_submit_before_set_fields', array( $this, 'retrive_entry_id' ), 10, 2 );
add_action( 'forminator_form_after_save_entry', array( $this, 'add_entry_id_to_hidden_field'), 10, 2);
}
public function retrive_entry_id( $entry, $form_id ){
if( $this->form_id == $form_id ){
$this->entry_id = $entry->entry_id;
}
}
public function add_entry_id_to_hidden_field( $form_id, $response ){
if( $this->form_id == $form_id ){
$entry_meta = array(
array(
'name' => 'hidden-1',
'value' => $this->entry_id
)
);
$entries = Forminator_API::get_entries( $form_id );
Forminator_API::update_form_entry( $form_id, $entries[0]->entry_id, $entry_meta );
}
}
}
$run = new wpmudev_forminator_add_entry_id_to_hidden_field_func;
}
}
Please make sure to add a hidden field with a custom value and once done update the above snippet in the following lines, ie from:
private $form_id = 63;//enter form_id here
To your form id, suppose your form id is 123, then the above line would be:
private $form_id = 123;//enter form_id here
Also make sure the field ID is correct too ie:
'name' => 'hidden-1',
If there are multiple hidden fields already on your form, then it’ll be listed as “hidden-1”, “hidden-2”, “hidden-3” etc, so do make sure the ID is correct for the hidden field in the snippet.
Once done the submission ID should get saved to the hidden field which you could export.
You can implement the above code as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
Please do let us know how that goes. Have a nice day ahead.
Kind Regards,
Nithin