This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Reset filters on login


  1. shaunmcgrath
    Member

    Is it possible to set something so that any filters i add to my entries page automatically reset when i leave the page or log out?

    I work with a large amount of data and set filters whenever I jump in there, would be nice to not have to click the Clear Filters and wait for the page to refresh every time..

    Let me know
    Thanks

    Posted 10 years ago #
  2. yuniar

    This is possible through some small modification.
    You can edit your "manage_forms.php" file.

    Search around line 32 for this code:

    $form_sort_by_complete = 'date_created-desc';

    Below that line, add this code:

    $query = "update ".MF_TABLE_PREFIX."entries_preferences set entries_enable_filter = 0 where user_id=?";
    $params = array($_SESSION['mf_user_id']);
    mf_do_query($query,$params,$dbh);
    
    $query = "delete from ".MF_TABLE_PREFIX."form_filters where user_id=?";
    $params = array($_SESSION['mf_user_id']);
    mf_do_query($query,$params,$dbh);

    This will reset your filters every time you go to the form manager page.


    MachForm Founder

    Posted 10 years ago #

RSS feed for this topic

Reply