48. Debugging Form Issues | Form Forge - Build Forms with AI in Seconds
Download Log in

48. Debugging Form Issues

Developer Guide

Tools and techniques for diagnosing form problems.

Enable WordPress Debug Logging

php
// wp-config.php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Form Forge logs integration errors to wp-content/debug.log:

text
[20-Jan-2025 14:35:22 UTC] FormForge: Mailchimp error: Invalid API key
[20-Jan-2025 14:35:23 UTC] FormForge: Google Sheets error: Token expired

Checking Submission Pipeline

php
// Temporarily log the full submission pipeline
add_action( 'formforge_before_submit', function( $form_id, $data, $form ) {
    error_log( 'FormForge DEBUG: before_submit form=' . $form_id
        . ' fields=' . count( $data ) );
}, 1, 3 );

add_action( 'formforge_after_submit', function( $submission_id, $form_id, $data ) {
    error_log( 'FormForge DEBUG: after_submit submission=' . $submission_id
        . ' form=' . $form_id );
}, 1, 3 );

Verifying Table Existence

php
global $wpdb;
$tables = [
    $wpdb->prefix . 'formforge_forms',
    $wpdb->prefix . 'formforge_submissions',
    $wpdb->prefix . 'formforge_analytics',
];

foreach ( $tables as $table ) {
    $exists = $wpdb->get_var( "SHOW TABLES LIKE '{$table}'" ) === $table;
    echo "{$table}: " . ( $exists ? 'OK' : 'MISSING' ) . "n";
}

Browser Console Debugging

Form Forge logs submission events to the browser console. Open DevTools and look for:

text
FormForge: Submitting form #42
FormForge: Validation passed
FormForge: AJAX response received
FormForge: Success — showing message

Common Issues

SymptomCauseFix
Form not renderingAssets not loadedForce-enqueue assets on the page
“Invalid form submission” errorStale nonce / page cacheExclude page from cache or refresh nonce via AJAX
Submissions not savedDatabase table missingDeactivate and reactivate the plugin
Webhooks not firingSSRF protection blocking URLUse a public, non-private-range URL
File upload failsPHP upload_max_filesize too lowIncrease in php.ini to at least 12M

Forge AI Assistant Online

Hi! I'm the Form Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs