Support the ongoing development of Laravel.io →
Input Views Forms
Last updated 2 years ago.
0

I had the same issue a few months ago. It's not a strange behaviour, because how should the form know which checkboxes were checked on the page before?

The only way (for me ) to handle this is to use ajax/js and php.

I send always an ajax request when the state of a checkbox is changing. On serverside I save the state in a session.

In your pagination form you can now get the state of the checkbox and check it while rendenring a new page.

When your send your Form you just need to get the values from session and all is fine.

This works for me great and without any issues.

See also my thread on stackoverflow: http://stackoverflow.com/questions/17929060/how-to-persist-checked-items-across-pagination-requests-in-laravel

Last updated 2 years ago.
0

If we use Form::model and not Form::open, the form should know the value in the table. The prove is when I refresh the page, the checkbox have its value properly.

Sorry if my english is bad.

Last updated 2 years ago.
0

Someone can help?

Last updated 2 years ago.
0

Can you provide some code?

I assume you have a form and inside the form is a pagination, right? When you have to use ajax/js to save the state of the checkbox.

Form::model won't save the state on the page before.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.