Created
November 6, 2020 00:45
-
-
Save patrickfreitasdev/96e3bdf3bbbc25ca6f142855c866859f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'forminator_addon_googlesheet_form_submitted_data', function( $submitted_data ) { | |
global $wpdb; | |
$entry_id = $wpdb->get_var( "SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{$wpdb->dbname}' AND TABLE_NAME = '{$wpdb->prefix}frmt_form_entry';" ); | |
if( $entry_id ){ | |
$submitted_data['hidden-1'] = ( $entry_id - 1 ); | |
} | |
return $submitted_data; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment