Mohamad Ghaoui

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Mohamad Ghaoui
    Participant
    Post count: 4

    Another way to prevent this client side is :
    onclick=”this.disabled=true;this.value=’Sending, please wait…’;this.form.submit();” < added simply in the form , frontend file on submit
    but this needs author attention

    Still can be overridden, any advice here ?
    Any support available ?

    Mohamad Ghaoui
    Participant
    Post count: 4

    My website is live and has sensitive codes so i couldnt wait up since i already integrated this, thanks a bunch for the tip about the bug and here is how i temporary solved it.

    Using your original code i added


    THEMEFOLDER/js/doubclick.js

    jQuery(function(doubleclick) {
    $(“form”).submit(function() {
    // submit more than once return false
    $(this).submit(function() {
    return false;
    });
    // submit once return true
    return true;
    });
    });

    Theme FUNCTIONS.PHP added before end

    add_action( ‘wp_enqueue_scripts’, ‘add_my_script’ );
    function add_my_script() {
    wp_enqueue_script(
    ‘doubleclick’, // name your script so that you can attach other scripts and de-register, etc.
    get_template_directory_uri() . ‘/js/doubleclick.js’, // this is the location of your script file
    array(‘jquery’) // this array lists the scripts upon which your script depends
    );
    }

    Mohamad Ghaoui
    Participant
    Post count: 4

    which front end file did you insert this to ? it appears the issue is still the same in their script yet !

Viewing 3 posts - 1 through 3 (of 3 total)