Stripe Credit Card Field Not Displaying in Modal

Continuing the discussion from Stripe Credit Card Field Not Displaying:

Hello! I’m having this very exact same issue.

Further details:

  1. The issue does NOT present itself when I normally use a shortcode into a blog post
    However, if I’m loading the Gravity Form in via a modal window using do_shortcode() the issue presents itself.
  2. Upon further inspection of the DOM, when going the modal route using do_shortcode(), the iFrame does not load.

Does anyone have any idea what settings need to be changed to get the card number field to appear without issue?


You shouldn’t programmatically embed a form via do_shortcode(), use the gravity_form() function instead: Adding a Form Using a Theme File or Hooks - Gravity Forms Documentation

Thank you for the tip!

I swapped out the code with what you recommended, however I’m still running into the same issue

Hi Vishal. When using the gravity_form() function to embed a form, be sure you are also using gravity_form_enqueue_scripts.

It’s mentioned here:

However, even with that, you may have a problem when adding a form in a modal. It’s up to the modal to load all the proper resources, and it sounds like that is not happening. Give this function a try and if it still does not work, I recommend contacting the support for the modal solution you are using to see if there is anything additional you need to do to add a Stripe Card field to a form when the form is in their modal. Thank you.

1 Like

Hi Chris - thank you for the suggestion! I gave it a shot and it has still not resolved the issue. I will open a support ticket per your suggestion.

Much gratitude,