Skip Navigation

[Resolved] Best practises : adding a toolset form to a single post page

This support ticket is created 4 years, 6 months 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by simon 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1368985

I have a holiday home rental site with around 5,000 visits per day. I have a booking form and a testimonial form on the single accommodation page, these are hidden initially - if the user clicks the appropriate button, they are opened in a pop-up. This works fine. If I look at what is happening behind the scenes, then I can see that CRED performs an ajax call to the backend, creates a auto-draft post and returns the post_id to the front-end - in my case this happens twice, once for each form. I understand that this is good practise and avoids race conditions assigning a post id.
In my implementation, the majority of visits to the page do not result in the forms being opened and I'd like to reduce the ajax calls to the back-end that are being generated by CRED.

Is there anyway to load a CRED form via ajax? Could I intercept the ajax calls in frontend.js and trigger them once my form has opened?

#1369155

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Siman,

Thank you for getting in touch.

Unfortunately not default from our plugins. Anything AJAX loading of the form will need to be a complete custom solution.

This would get quite complex since the form is loaded with PHP onto the frontend since it is a shortcode. It would perhaps involve you adding the form to an unlisted page and then making an AJAX request for that page on demand.

Or you can just add the forms to a secondary page and click to it.

Any solution would have to be completely custom which would be out of the scope of our support forum.

Thanks,
Shane

#1369239

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.