Viewing 8 replies - 1 through 8 (of 8 total)
  • Have you had any luck on this? Same thing happens for Gravity forms

    Plugin Author Damian

    (@timersys)

    what script are you using?

    Thread Starter yanivjs

    (@yanivjs)

    on_sent_ok: “document.location=’?p=5060′;”

    or

    on_sent_ok: “location = ‘http://www.mydomain/?p=5060’;”

    Plugin Author Damian

    (@timersys)

    What you could do instead of adding the script the the form, is to subscribe to the popup.
    These are the available events :https://gist.github.com/timersys/e274ea870cfead11eef0

    So you could do something like:

    jQuery(document).on('spu.box_close',function(e,id){
    // if id match your popup id
    if( id = 120 ) {
    location.replace =  'http://www.mydomain/?p=5060';
    }
    });

    And Im pretty sure gravity form also have a way to attach to events:

    ` $(document).on(‘gform_confirmation_loaded’, function(){
    location.replace = ‘http://www.mydomain/?p=5060’;
    });

    Thread Starter yanivjs

    (@yanivjs)

    Thank you Damian,

    I understand that I should try the code you gave here, and replace the popup ID and url.

    But where should I put it? Put it as shown in your reply, in functions.php?

    Please please advise

    Thanks

    Yaniv

    Plugin Author Damian

    (@timersys)

    Hi Yaniv just place in on your theme scripts file. Those files could be named something like script.js or something like that ( note .js extension and not .php)

    Thread Starter yanivjs

    (@yanivjs)

    Hi Damian,

    Doesn’t work for me.

    I did put this in the theme script.js file:

    jQuery(document).on(‘spu.box_close’,function(e,id){
    // if id match your popup id
    if( id = 6307 ) {
    location.replace = ‘http://www.mydomain/?p=5060’;
    }
    });

    Where 6307 is the ID (though in WP admin, the popup id is #spu-6307)

    And it does not redirect.

    Any hint?

    Thanks

    Plugin Author Damian

    (@timersys)

    paste the url where your popup is active

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘CF7 in Popups – redirection problem after sending’ is closed to new replies.