-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combining Stripe One-Off and Subscription options in the same form? #2277
Comments
You can have multiple payment fields, with conditional rules set. Typically you'd give your users a choice in some fashion to be able to pick a once-off or subscription payment, which would be aligned to the conditions of showing those fields.
What Formie version are you on? This should certainly work. And by the way, just adding |
What Formie version are you on? |
Formie Version 3.0.20.
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Josh Crawford ***@***.***>
Sent: Monday, February 3, 2025 11:40:43 PM
To: verbb/formie ***@***.***>
Cc: Lewis Jenkins ***@***.***>; Author ***@***.***>
Subject: Re: [verbb/formie] Combining Stripe One-Off and Subscription options in the same form? (Issue #2277)
What Formie version are you on?
—
Reply to this email directly, view it on GitHub<#2277 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAZZVRVLP3C2SILNKUJPDW32N747XAVCNFSM6AAAAABWMCR3USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZSGQZDGNJWG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sorry, I probably confused things with my last screenshot. I did previously have conditional logic in place but was getting errors so I had removed it. For clarity, I have made a short video of the issue I'm having. This is a reduced test case with a simple form, which hopefully demonstrates the issue. I hope this helps :) |
Thanks for the video, that's pretty much what I had on my end. I thought that's what you might've done is toggling back and forth. Looks like we need to unload the Stripe JS when the field is hidden. |
Fixed for the next release. To get this early, run |
Thank you for this. I can confirm everything now appears to be working. However, I have noticed that for each submission in the Control Panel, the payment is listed twice. To clarify, only one payment is taken (as expected) but it is listed twice, which could potentially cause confusion. In this example, both "View in Stripe" links are linking to the exact same URL. |
Good call, just a visual issue because there are technically two payment fields, but only one with transaction data, so it's doubling the output. Fixed for the next release. To get this early, run |
Question
What are my options for combining both Stripe "One-Off" and "Subscription" options in the same form?
Currently, a Stripe field needs to be one or the other.
I tried creating a dropdown with options for "Single Payment" and "Monthly Donation", and then having two Stripe fields, each set to show/hide using conditional rules based on the dropdown. This doesn't work because the hidden field still fails validation so the form cannot submit.
It would be great if there was a way for the user to eg. check a box ("Make this a monthly donation") within the form.
Or, if a Stripe field has data-conditionally-hidden="true" then it could bypass validation.
Is there a workaround for this?
Additional context
No response
The text was updated successfully, but these errors were encountered: