CF8 - Filter + PageReload + Table + Pagination

Reset filters when using pagination with checkboxes in ChronoForms.

Overview

The issue occurs because pagination does not automatically reset the start position when filters are applied using custom checkbox handling.
Ensure the form resets to the first page on filter submission by manually setting the start_at parameter to zero when the form is posted.

Answered
rb rbock 30 Oct, 2024

Page 1 + Filter + Pagereload + Table = works so far, although I haven't been able to preselect a checkbox only the first time I open it. The real problem is that when I press 1 in the pagination, all the filters that have been set are gone!

Max_admin Max_admin 02 Nov, 2024

preselect a checkbox only the first time I open it

what does that mean ?

The real problem is that when I press 1 in the pagination, all the filters that have been set are gone!

Do you submit the page ? if yes then the values should be kept in the data, you can verify this if you enable the form debug

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin Max_admin 30 Nov, 2024
Answer

I think this should be fixed in v8.0.29

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 01 Dec, 2024

strlen(): Argument #1 ($string) must be of type string, array given

Max_admin Max_admin 01 Dec, 2024

do you have search/filter with checkboxes or multi dropdown ? this is where the issue occurs

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 01 Dec, 2024

When you click on the pagination, the filters are no longer reset, thanks BUT: Set filter 1 and search, click on the last page of the pagination, then set another filter! Unfortunately, the page does not jump to start_at=0! This shows that there are no results! Even though there may be 2 records!

Max_admin Max_admin 01 Dec, 2024

how do you filter ?

for me it works when I set my filter as a dropdown and set an Event to "submit form" when the dropdown value changes

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rb rbock 01 Dec, 2024

And on submit it always jumps to start_at=0?

rb rbock 01 Dec, 2024

I use checkboxes, read the values ​​using PHP and generate SQL values ​​as variables. I insert the variables into the Where fields.

Max_admin Max_admin 01 Dec, 2024
1 Likes

with automatic filtering using the List Filter behavior it should work, if you want to do it yourself then you need to use the following code:

if(!empty($_POST)){
$this->data["start_at"] = 0;
}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.