Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • mbmarketing

    (@mbmarketing)

    After trying a number of different code configurations, I was successful with the following segment.

    I used the die function with a javascript re-direct and I put it at the top of the dgx_donate_display_thank_you() function:


    die(‘<script type=”text/javascript”>window.location.href=”https://www.domain.com/landingpage/&#8221;;</script>’);

    Here is my actual code, just substitute your thank-you page url and you should be good to go.

    Remember, this will be overwritten during the next update. Hopefully, it will include the feature a feature for a custom thank-you page ??


    function dgx_donate_display_thank_you()

    {
    die(‘<script type=”text/javascript”>window.location.href=”https://www.colvinforchange.com/contributions/thank-you-for-your-contribution/&#8221;;</script>’);

    $output = “<p>”;
    $thankYouText = get_option(‘dgx_donate_thanks_text’);
    $thankYouText = nl2br($thankYouText);
    $output .= $thankYouText;
    $output .= “</p>”;

    return $output;
    }

    Now when the donor/contributor returns from PayPal to my original donor page with the thank you parameter.

    https://www.colvinforchange.com/contributions/?thanks=1

    They get redirected to my custom thank-you page:

    https://www.colvinforchange.com/contributions/thank-you-for-your-contribution/

    It seems to be working fine so far. Since the Header() function has already be called, you should not have any header conflicts.

    If you do, the following code segment may be helpful:

    // $url should be an absolute url
    function redirect($url){
    if (headers_sent()){
    die(‘<script type=”text/javascript”>window.location.href=”‘ . $url . ‘”;</script>’);
    }else{
    header(‘Location: ‘ . $url);
    die();
    }
    }

    I was getting the same error on my website – https://www.wpseotoolbox.com when I tried to add a new form.

    So, after checking the config and deleting and re-installing visual form builder, I decided to see if it was conflicting with some other plugins.

    I deactivated all of my plugins, click on Add New under the VFB Tab and it worked!!!

    I re-activated my other plugins and it is still working. I am not sure where the conflict was…but, I am happy it turn out for me.

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