PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

PayPal & iframes

  1. jonfoster
    Member

    Hi,
    I'm using the paypal add-on with a form I want to display in an iframe. One problem - when the form redirects to PayPal, it stays in the iframe, if that makes sense. Is there anyway to make the PayPal redirect happen in the top window?

    Thanks,
    Jon

    Posted 9 years ago on Friday August 12, 2011 | Permalink
  2. There currently is not, you'd probably have to edit the core plugin code to do this. I'm not aware of anyway to do this using existing features. But we can look into this on our end and see how we can improve this functionality in the future.

    The problem is going to be PayPal returns you to your site and it's not going to know the form was in an iframe... it's just going to return the user to the form itself. So these are some of the issues utilizing an iframe is going to cause.

    Posted 9 years ago on Friday August 12, 2011 | Permalink
  3. jonfoster
    Member

    Thanks - can you point me to the location of the gFormRedirect function in the core files so I can have a go at modifying it?

    Thanks
    Jon

    Posted 9 years ago on Tuesday August 23, 2011 | Permalink
  4. The PayPal Add-On does this, not the core Gravity Forms plugin. So you'd have to look in the PayPal Add-On code. You'd have to look at where it overrides the form processing to redirect to PayPal and see how you can modify that. So you'd have to customize the PayPal Add-On, not Gravity Forms itself.

    Posted 9 years ago on Tuesday August 23, 2011 | Permalink
  5. I'm currently looking at a way to do this myself.
    The purpose is to use Gforms and Paypal add-on in a Facebook page (iframe).
    The redirect will not work within the iFrame, but a new target window is allowed.
    If anyone has had any luck modifying the paypal plugin to do this, please advise.

    Thanks.

    Posted 9 years ago on Saturday September 17, 2011 | Permalink
  6. It looks like I can accomplish this with a little javascript.. can't I change the onclick to open in a new window? Not sure exactly how to do this yet.. but I believe this is the portion of code needing to be changed:

    <div id="paypal_submit_container" class="margin_vertical_30">
    <input type="submit" name="gf_paypal_submit" value="<?php echo empty($id) ? __(" Save ", "gravityformspaypal") : __("Update", "gravityformspaypal"); ?>" class="button-primary"/>
    <input type="button" value="<?php _e("Cancel", "gravityformspaypal"); ?>" class="button" onclick="javascript:document.location='admin.php?page=gf_paypal'" />
    </div>

    Posted 9 years ago on Saturday September 17, 2011 | Permalink