Hi, I've an Edit form for CPT Trainers with AJAX submit. I've built a View where I list all the Trainers with an edit form for each one of them. I've activated infinite scroll.
When I scroll down and the page loads more Trainers and forms, the forms submit stops working.
I found that the infinite scroll start again the numbering of the form ID, so I have on the page more then one <form id="cred_form_745_1">. I think that is the problem.
I've struggled with this bug for quite some time. It forces me to abandon infinite scrolling. If only there was a way to not have the IDs reset, it would enable amazing functionality possibilities.
Sorry, nothing yet. It is on the development board but didn't make it into the sprint we are just closing for testing which should be out soon, so any fix will be a while yet I'm afraid.
I would be willing to pay a premium for this bug to be fixed. I have a site that is on hold while this gets sorted. I've built a social media status update page that loads many CPTs with the ability for users to add comments, like/dislike, etc each post... as you can imagine, lots of CRED forms are in use. Infinite scroll is an important feature for a social media status feed and unfortunately the resetting of form IDs kills the functionality.
praying for a fix! but I've got cash in hand to help it along.
Yes, you can regenerate the IDs of the form using the code as given under:
jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.effect (string) The View AJAX pagination effect
* data.speed (integer) The View AJAX pagination speed in miliseconds
* data.layout (object) The jQuery object for the View layout wrapper
*/
i = 0;
jQuery(".js-wpv-view-layout form").each(function(){
newID = 'cred_form_745_'+ i++;
jQuery(this).attr("id",newID);
});
});
But, it will have other site effects of displaying the messages and all. Each element (intput,submit etc..etcc) is bind with the form ID prefix so its really hard to control everything by just chaning the form IDs. And again it will be a workaround and may get broken at any time so I suggest to wait for official fix.
I would like to inform you that we just release Toolset forms version 2.6.10 that holds the fix for this issue. You are welcome to update ALL Toolset plugins.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/
I see with the site you shared with private message you are not using latest Toolset plugins.
We always recommend running your site with the latest stable release plugin version. Could you please update ALL Toolset plugins to it's latest officially released version.
*** Please make a FULL BACKUP of your database and website.***
You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/