API get_entries() Limit Number of Entries Returned
-
Firstly, I love Forminator, BTW. Great plugin!
I use the Forminator API quite extensively with our own backend systems. When using the API, I use the get_entries( $form_id ) function quite often. By default it returns ALL entries from the entire database in DESC order; it’s in DESC order because it shows the last entries first. This is fine and I like the DESC order, but it’s quite resource intensive when returning ALL entries. I would like to restrict the number of returned entries when calling this API function to say, the last 3 entries.
It would be nice to be able to call the function in a manor similar to this: get_entries( $form_id, $limit=3 ), where $limit is the maximum number of entries I want returned.
Limiting the number of entries returned would speed up the call and be less resource intensive for those of us that do not need ALL entries returned. If the 2nd parameter is not sent to the get_entries() function, then it could still, by default, return all form entries, as usual.
I could make these changes myself in the code (it’s not that difficult), but as soon as a Forminator update comes, I’m sure I’d have to change it again. So, with that said, I would like to request that this be added to the source code in future versions.
Thank you, and again, great plugin! ??
- The topic ‘API get_entries() Limit Number of Entries Returned’ is closed to new replies.