• Resolved Katy87

    (@katy87)


    Hi, is it possible to reset the count of exports, which is visible on the settings page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @katy87,

    Not at the moment, but I have to on the radar. You could hack the database ??

    I’ll see if I can give you a temporary fix in the meantime. I’ll get back to you on this!

    Thread Starter Katy87

    (@katy87)

    Haha, oke thanks ??

    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @katy87,

    Got a small function for you to reset a specific form.

    //add this to your functions.php
    
    function resetFormDownloadCount($form_id) {
        $form_meta = GFFormsModel::get_form_meta($form_id);
        if (array_key_exists(\GFExcel\GFExcel::KEY_COUNT, $form_meta)) {
            $form_meta[\GFExcel\GFExcel::KEY_COUNT] = 0;
            GFFormsModel::update_form_meta($form_id, $form_meta);
        }
    }
    
    // now let's reset a form. Here we are resetting form: 1. 
    resetFormDownloadCount(1); // remove or escape this line after the reset

    When it is reset, remove, or escape the last line (with // in front of it) to prevent it from being continously reset, and stay forever young, eh.. zero.

    Please let me know if this worked for you!

    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @katy87, just a heads up; this is now native as of 1.6.1. You get a little reset button next to the download button.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reset export count’ is closed to new replies.