How to style form elements embedded in stripe's iframes?

By: Steve Lambert | Asked: 11/01/2024
ForumsCategory: General questionsHow to style form elements embedded in stripe's iframes?
Steve LambertSteve Lambert asked 2 months ago

I've got a form that accepts payments through stripe.

We've taken great care to design our forms, so the stripe embedded elements look very out of place (see screenshot).

I'm looking for a way to style these elements to match.

I've looked through the stripe documentation and it appears there's some way to add elements to an entirely custom made form, but I don't see how to make those changes with what gets embedded in formidable forms.

Someone must have encountered this before me and found a solution!?

 

Screenshot

Attachments
1 Answers
Victor Font answered 2 months ago

You can't. iFrame content is under the control of the external site. CSS needs to be located on the child page.This has nothing to do with Formidable. It's the way iframes work.

Steve LambertSteve Lambert replied 2 months ago

Ok.

But Formidable doesn't offer an option to use the features within Stripe - Stripe Elements etc – to style those areas?

In my searching, I saw that WP Forms does have this feature, so it appears to be feasible:
https://wpforms.com/developers/how-to-customize-the-stripe-styling/

Steve LambertSteve Lambert replied 2 months ago

It also seems to be possible to use the Stripe Elements Appearance API with WooCommerce through using PHP filters.

https://woocommerce.com/document/stripe/customization/style-payment-form/

Any ideas there that might make this possible with Formidable, currently?

If not, how likely is it that a feature like this could be added in Formidable?

Victor Font replied 2 months ago

You are comparing apples to oranges. iframes are known to be a source of cross site scripting attacks. An iframe is a black box that cannot be manipulated by code from the parent. The chances are high that WPForms is not using an iframe at all but is supplying its own form that you can style. You can always create your own form in Formidable, but then you fall under the requirement to comply with PCI Standards that require an audit for compliance certification. There's a reason Stripe wants you to run their capture form in a iframe. Not doing so is a security risk and you are assuming the responsibility for mitigating it.

Victor Font replied 2 months ago

Steve, you're asking your question of the wrong audience. We are community volunteers and have no idea what it would take to implement what you are asking in Formidable. Please direct your question to Strategy 11 through your support account.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right