Welcome Guest, Not a member yet? Register   Sign In
pagination and form
#1

[eluser]deineMudder[/eluser]
Hello everyone.
is there any chance of keeping submitted form values when i use the pagination?
simple idea:

i got a search form. when submitting the form i use the validation class to refill the form with the necessary values and use those values to create my search query. i get my pagination displayed and everything works fine for the first page. if i use my pagination and click another site, my form is empty again and i get no results for the query any longer.

i bet it is a general thinking problem.
maybe anyone can come with a solution or suggestion.

thank you
#2

[eluser]deineMudder[/eluser]
i was browsing the forum for a while longer now,
and im still not sure about that whole pagination issue.
if i need any parameters passed to my query for searchin in the db like

search_username
search_id
is_active
page_results

do i need to rewrite the url of the pagination and pass it as
admin/user/search/search_username/test/is_active/1/page_results/10

is that correct?
if so, wouldnt it be ALOT easier to have the pagination as form-a-like function and pass the current query as hidden parameter?

or should i switch to sessions and store my queries in the session?
#3

[eluser]deineMudder[/eluser]
i was just talking to a mate at work who came up with a really nice idea.

using a query to collect ALL data with all parameters.



and then use the pagination to browse through the result set with an AJAX function which just reloads the display part of the results.

this means i wont change url_segments with the current offset but pass the offset to an AJAX function. anyone got an idea how to realise that?
maybe theres an tutorial out there to share?




Theme © iAndrew 2016 - Forum software by © MyBB