0

I have a form with criterias that return a list of results in the same view adding the PagerFanta paginator. To go to next page or previous page I need send the same form data (criterias).

What is the better way?

Thank you and I'm sorry for my English.

fjhdez
  • 11
  • 1
  • have you tried to goole this issue? – Malachi Dec 11 '13 at 23:22
  • Yes, I have searched in differents forms. – fjhdez Dec 11 '13 at 23:41
  • can you please provide some code for this, I am not familiar with the PagerFanta or Symfony2 or twig, but I am sure that anyone that is going to help you fix this will need more information about the whole thing – Malachi Dec 11 '13 at 23:46

1 Answers1

0

I have solved with this approach:

When I render the view of twig I Always fill the form with the data of previous post...

With this javascript code I get the expected result

$('.pagination ul > li > a').click(function(event) {
  event.preventDefault();
  $('#form_name').attr('action', this.href);
  $('#form_name').submit();
});
fjhdez
  • 11
  • 1