Support » Plugin: Contact Form Plugin - Fastest Contact Form Builder Plugin for WordPress by Fluent Forms » Form Meta remains in database after form is deleted

  • Resolved Eugene

    (@euguk007)


    Hi,

    I hope that the title is enough, but just to confirm:

    if a form is deleted completely, its meta remains in the fluentform_form_meta table.

    Could you please fix this?

    Many thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shahjahan Jewel

    (@techjewel)

    Thanks for reporting. We are going to fix this issue in our next version.

    Thread Starter Eugene

    (@euguk007)

    Cheers! Here’s the fix.

    protected function deleteFormAssests($formId)
        {
            // Now Let's delete associate items
            wpFluent()->table('fluentform_form_meta') // fix here
                ->where('form_id', $formId)
                ->delete();
    
            wpFluent()->table('fluentform_submissions')
                ->where('form_id', $formId)
                ->delete();
    
            wpFluent()->table('fluentform_submission_meta')
                ->where('form_id', $formId)
                ->delete();
    
            wpFluent()->table('fluentform_entry_details')
                ->where('form_id', $formId)
                ->delete();
    
            wpFluent()->table('fluentform_form_analytics')
                ->where('form_id', $formId)
                ->delete();
    
            wpFluent()->table('fluentform_logs')
                ->where('parent_source_id', $formId)
                ->whereIn('source_type', ['submission_item', 'form_item'])
                ->delete();
    
            ob_start();
            if (defined('FLUENTFORMPRO')) {
                try {
                    wpFluent()->table('fluentform_order_items')
                        ->where('form_id', $formId)
                        ->delete();
    
                    wpFluent()->table('fluentform_transactions')
                        ->where('form_id', $formId)
                        ->delete();
                } catch (\Exception $exception) {
    
                }
            }
            $errors = ob_get_clean();
            return $errors;
        }
    Plugin Author Shahjahan Jewel

    (@techjewel)

    Thanks. We already fixed it in our dev branch. So will be pushed to the next version.

    Hello Shahjahan,

    Will the next version delete old entries in db or just the new ones after updating?

    Regards,

    Julia

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.