1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Problem with the prefilter

Discussion in 'Community' started by sasha199, Apr 21, 2021.

  1. sasha199

    sasha199 New Member

    Level: Community
    Hello everyone, there is such a problem, I install the prefilter, everything works, but when I filter the data through the form, then the prefilter does not cancel its action and continues to work as well, how to solve the problem?
    Switch overriden by menu/modules translated into both positions, does not help
     
  2. juuser

    juuser Well-Known Member

    Level: Community
  3. sasha199

    sasha199 New Member

    Level: Community
    thank you for the answer, but this does not suit me, I have filtering by creation date, I filtered the data created in the current month, and I wanted that after filtering through the form, the prefilter stopped working, turned off, and when the form was updated, it started working again
     
  4. juuser

    juuser Well-Known Member

    Level: Community
    Could you explain your workflow in more detail like:
    1) User opens list with pre-filter applied to only show current month records;
    2) Next...
     
  5. sasha199

    sasha199 New Member

    Level: Community
    The user opens the list, the filter form is on top, by default it has all values equal to 0, the positions themselves are below, I would like that when the user opens the list, there are positions created in the current month in front of him, and after he himself applied the filter from the form, it would show the positions for all the time
    [​IMG]
     
  6. sasha199

    sasha199 New Member

    Level: Community
    request for pre-filter
    [​IMG]
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    As @juuser says
    The sense of a list prefilter is that it can't be overridden by any user action.

    For simple URL filters (like mytable___foo=abc) you can use the "Fabrik list" menu's "Fabrik list options/Extra Query String"
    For complex ones using values and conditions (as needed for date filtering) you need to put the complete URL into a "System Links/URL" menu item.

    Those "preset" URL filters can be cleared and overridden by the user.
     
    sasha199 and juuser like this.
  8. sasha199

    sasha199 New Member

    Level: Community
    Thank you very much for the answer, I will try to filter by url
     
  9. sasha199

    sasha199 New Member

    Level: Community
    Please tell me how to pass the end of the current month in the URL?
    Code (Text):
    http://localhost/index.php?option=com_fabrik&view=list&listid=8&Itemid=121&&sbrh2_tabel_pers___createdate[value][]=-1%20month&sbrh2_tabel_pers___createdate[value][]=now&sbrh2_tabel_pers___createdate[condition]=BETWEEN
     
    Last edited: Apr 22, 2021
  10. troester

    troester Well-Known Member Staff Member

    Level: Community
    Just
    sbrh2_tabel_pers___createdate[condition]=thismonth
    (without any ...[value])
    should do (I didn't know it myself).
    I added it to the WIKI
     
    Last edited: Apr 22, 2021
    sasha199 and juuser like this.

Share This Page