October CMS Repeater Pagination Or Load More
Hello fellow developers,
I am currently working on a project backed by octoberCMS. Everything seems great except the repeaters.
- When the number of the repeater is too much (more than 50) the page hangs up and send an error message of max execution limit exceeded. I don't want to increase the max execution limit but load 10 Repeater at a time with the help of pagination or load more functionality that should be achievable by Ajax.
- One of my requirement is to popup a form when clicked in a button inside each repeater list item. I'm currently working on it but its taking quite a long time now. the modal should load the update form. Anyone has worked on this sort of situation if yes, any suggestions on how to pop save the form via ajax?
Any answer for my 2 questions would be highly appreciated.
because your requirement is so specific so I think the best solution would be to create your own form widget for that.
you can see the how octobercms repeater widget is created over here \modules\backend\formwidgets\repeater
you can copy this widget and paste it into your manually created plugin and then change everything like namespace and widget name etc.. and make it to use the same way as actual repeater works.
and if you don't know how widget is created then first of all you should learn it from here https://octobercms.com/docs/backend/widgets#form-widgets
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page