This topic is locked

Preserve selected items in list

11/24/2023 8:15:15 AM
PHPRunner General questions
P
PK author

I have a list of items that I can select a few of them by checking the checkboxes in the list. Then I go to the next page and select a few more items. When I return to the previous page the first items I checked are now unchecked.
What can I do to ensure that the checked items are preserved as I move from page to page of the list

admin 11/24/2023

You will need to save the info about selected records somewhere. The easiest option is to save it in the database but you can use cookies as well. Then on a page load you need to match saved IDs with IDs on the current page and select those checkboxes where it matches.

P
PK author 11/30/2023

Thank you. I will give it a shot