Skip Navigation

[Resolved] CRED AJAX form options

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

Our next available supporter will start replying to tickets in about 0.92 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 3 voices.

Last updated by mykolaK-2 6 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#592013
form-submit-message.png

Dear support!

I have a CRED AJAX form in a modal Bootstrap window. This form creates a new custom post, and it does so with AJAX. "After visitors submit this form" option is set to "Keep displaying this form".

What I need to do is display a modal with some text to the user, after user clicks on some button show them the form (the form is within the same modal, hidden initially, and on a button click I remove a 'hidden' class to display a form), and after form is submitted hide it (by adding a class 'hidden' to the form) and display some other text. All this is going to be done with JS.

However, I cannot figure out a couple of configuration options I need to apply to it.

1. After a form it submitted, it shows the following message in a separate pop-up window: "Operation completed successfully". Please see an attached screenshot for reference. How do I disable it?

2. After the form is submitted, it seems to be reloading a modal content erasing all adjustments I've made with JS. How to prevent this? I want form just to submit data and show nothing else to the user (ideally the form would hide itself after data is submitted). If it cannot be prevented, is there any JS callback that is fired after redraw where I can restore those parameters that were set with JS?

3. Are there any JS callbacks that are triggered after a form is submitted successfully? I would like to use those to track that the form has finished its job and can be hidden.

Are those things possible to implement? Please let me know if you need any additional information. Thanks!

Best regards,
Kir

#592362

Dear Kir

Q1) "Operation completed successfully". Please see an attached screenshot for reference. How do I disable it?
To remove the alert message after ajax submission is already in CRED future release 2.0, our developers are working on it, but there isn't any ETA for it, you can subscribe to our blog to get the updated news:
https://toolset.com/blog/

Q2) After the form is submitted, it seems to be reloading a modal content erasing all adjustments I've made with JS. How to prevent this?
There isn't such a built-in feature within CRED plugin, it is expected result, that it will be reloaded after user submit the CRED form successfully, so it cannot be prevented. we don't currently provide any JavaScript API that publicly exposes front-end events. This is something lots of people have asked for, but our developers have not yet implemented. Any custom implementation developed for this purpose, e.g. listening to all AJAX events and responding accordingly for CRED events, would require custom code, which is outside the scope of the support we provide here in the forum.

Q3) Are there any JS callbacks that are triggered after a form is submitted successfully? I would like to use those to track that the form has finished its job and can be hidden.
Same as above Q2), there isn't such a built-in feature within CRED form, if you agree, we can take it as a feature request.

#592375

Thanks, Luo!

It would be great to see those features implemented one day as they will allow to seamlessly integrate CRED forms into a JavaScript-based code, especially since WP is moving parts of the workflow from PHP to JS - see Project Gutenberg.

#629942
2018-03-30_102318.jpg

Hi, I have same problem ut I do not understand how off.

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