fill in filter with $get variable

Discuss MySQL Ajax Table Editor Paid Version

fill in filter with $get variable

Postby zwerfkat » Fri Feb 06, 2015 9:00 am

I am filling in one of the filter fields by means of $_GET['search'] variable as follows:

$this->Editor->sessionData['filterSearches']['column_name'] = isset($_GET['search']) ? $_GET['search'] : '';

This works as expected, the search term is correctly filled in and the column if filtered. When I press "Clear Filters" the field is cleared, so far so good.
However, when I do a page refresh, or using the back button in my browser, the filter is not filled in again. It seems to stay cleared all the time. Only when I remove the cookies in my browser the search term is coming back.

When debugging, sessionData['filterSearches'][''column_name'] is correctly filled in after a page refresh, so I wonder why the cookie is not updated? Can this be forced by explicitly updating the cookie one way or the other?

Thanks in advance for any hint,

regards Frans (Netherlands)
zwerfkat
 
Posts: 3
Joined: Tue Jan 27, 2015 11:26 am

Re: fill in filter with $get variable

Postby zwerfkat » Fri Feb 06, 2015 10:08 am

sorry, already find the solution:

$defaultSessionData['filterSearches']['column_name'] = isset($_GET['search']) ? $_GET['search'] : '';
zwerfkat
 
Posts: 3
Joined: Tue Jan 27, 2015 11:26 am


Return to Paid Version

Who is online

Users browsing this forum: No registered users and 2 guests

cron