Home › Forums › Quform WordPress › Save to Database
- This topic has 11 replies, 2 voices, and was last updated 3 years, 8 months ago by Ally.
- AuthorPosts
- March 9, 2021 at 12:57 pm #32628linuxParticipant
Hi,
I have problem with save data to custom database. Try to “use wordpress database” and different database. I following instruction https://support.themecatcher.net/quform-wordpress/settings/database-settings/custom-database-settings
I also set “what to save” and i following https://support.themecatcher.net/quform-wordpress-v2/guides/integration/saving-form-data-to-a-custom-database
I already enable wordpress debug log by following https://support.themecatcher.net/quform-wordpress-v2/guides/advanced/enabling-debug-logging.
But data not save to both wordpress database or different database. I dont see debug log on wp-content/debug.log
Please help.
March 9, 2021 at 1:02 pm #32629linuxParticipantTry to upload debug.log from my local computer to my cpanel. And set permission to 666
But debug.log emptyMarch 9, 2021 at 4:03 pm #32630linuxParticipantTry with codes below, but debug.log still empty
define( ‘WP_DEBUG’, true );
if ( WP_DEBUG ) {
@error_reporting( E_ALL );
@ini_set( ‘log_errors’, true );
@ini_set( ‘log_errors_max_len’, ‘0’ );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
define( ‘CONCATENATE_SCRIPTS’, false );
define( ‘SAVEQUERIES’, true );
}March 9, 2021 at 4:25 pm #32631linuxParticipantTry to use code below. But still not save to database
//SAVE TO DATABASE
add_filter(‘quform_post_process_1’, function (array $result, Quform_Form $form) {
global $wpdb;$data = array(
‘nama’ => $form->getValueText(‘quform_1_3′),
’email’ => $form->getValueText(‘quform_1_4’),
‘telepon’ => $form->getValueText(‘quform_1_5’),
‘pelatihan’ => $form->getValueText(‘quform_1_6’),
);$wpdb->insert(‘pelatihan’, $data);
return $result;
}, 10, 2);March 9, 2021 at 4:25 pm #32632linuxParticipantMy theme using Elementor page builder
March 9, 2021 at 11:20 pm #32634linuxParticipantI disable all plugins except quform and use twenty theme. Still not working
March 10, 2021 at 4:56 am #32638linuxParticipantHello, wordpress debug is working. But data still not save to wordpress db or external db. And debug.log no error.
March 11, 2021 at 10:02 am #32653AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 11, 2021 at 5:02 pm #32663linuxParticipantI send the credential login. Check your contact form.
Please check it asap. I difficult to monitoring this ticket because we have different time. At 11PM now.March 12, 2021 at 10:42 am #32668AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 13, 2021 at 2:10 pm #32675linuxParticipantHello, my problem solved by your update varchar to 255 characters.
Anyway, how to prevent duplicate entry ? I see to many duplicate record on my table. And timestamp is same for duplicate entry.March 15, 2021 at 9:28 am #32684AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.