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
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.
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.
Hi, I have same problem ut I do not understand how off.