Skip Navigation

[Gelöst] "If Cred Form is valid" doesn't take effect any more

Dies ist das technische Support-Forum für Toolset – eine Suite von Plugins zur Entwicklung von WordPress-Websites ohne PHP-Pogrammierung.

Jeder kann in diesem Forum lesen, aber nur Toolset-Kunden können darin Beiträge veröffentlichen. Der Toolset-Support arbeitet 6 Tage pro Woche, 19 Stunden pro Tag.

This topic contains 1 Antwort, has 2 Stimmen.

Last updated by Christian Cox vor 3 Jahre, 11 Monate.

Assigned support staff: Christian Cox.

Author
Artikel
#599414

Hi there!

Before my last Toolset updates my custom JavaScript in a Content Cred Form worked perfectly, after the updates it doesn't work anymore. Please for help!

Because on this website of mine the sending of the Cred Form really takes a lot of time, some customers do click the sending-button twice or three times. And if they do so, we are all getting two or three e-mail-notifications with the same content. That was really annoying. So I decided (with former help of your support) to hide the sending-button after the Cred-Form is validated, and display a message "Please be patient ..." instead. That worked really well in the past.

But as I said, after one of the last Toolset-updates the Javascript doesn't take effect anymore. But there are no error-messages in my console. So I'm wondering if the validate-function itself did change in the new version of CRED?

Here is my custom jQuery, which I placed directly in the JS-Editor-field in my Content-CRED-Forms settings:

jQuery(document).ready(function($){ 
  $('#cred_form_793_1').submit(function(event) {
    if ( $('#cred_form_793_1').valid() ) {
        $("#cred_form_793_1 .submitdiv input").hide();
        $("#cred_form_793_1 .submitdiv .submittxt").show();
    }
  });
});

If you wanna see the form in action, please take a look here:
hidden link
Scroll down to one of the rooms and click on "Enquiry". If you are sending the form for a test, please note "Support Test" as a name, so that my client knows, that he will not have to send you an offer.

Thanks in advance!
Diana

#599622

You do not need that custom code anymore. We actually were aware that you are able to submit a CRED form several times, if you where fast enough to click repeatedly on the submit button.

We solved this in past releases: https://toolset.com/forums/topic/cred-ajax-forms-prevent-duplicate-post/

I would suggest you switch to AJAX submission (if not already done), and test this again with the new versions, not using any Custom Code. It should not be possible to submit a form more than once at all anymore.

Das Forum „Toolset Professioneller Support“ ist für neue Themen und Antworten geschlossen.