Skip Navigation

[Resolved] Toolset forms with same ID in a View with infinite scroll

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 11 replies, has 4 voices.

Last updated by Minesh 3 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#1787277

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.

You can check it on my website on this page:

/trainers-edit/

This is the View:

/wp-admin/admin.php?page=views-editor&view_id=746

This is the Form:

/wp-admin/post.php?post=745&action=edit

cheers

#1788427

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - I can see the issue on my local test install.

Please allow me to report this issue to our next level support.

Please hold on for further updates.

#1792061

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.

thanks for finding a solution.

marc

#1833415

Hi, is there any news about this issue?

Thanks

#1833421

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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.

#1836291

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Changing the status of ticket.

#1837095

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.

thanks

marc

#1913001

Hi, is there any workaround for this issue?

For example, is it possible to use this frontend event to fix the Forms IDs:

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
	*/
	
});
#1913031

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see there is no workaround offered by Devs yet.

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.

#2121979

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

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/

#2128541

Hi, it seems the issue is still not fixed.

cheers

#2129485

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

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/

Do you see the issue with latest Toolset plugins?