#kingy-element
1 messages · Page 1 of 1 (latest)
@lime delta this is a question I've heard a couple of times, but we don't support this yet as far as I know. Can you expand on the use case a little so I can help understand?
The last person who asked this, I suggested they collapse the element at least. https://stripe.com/docs/js/elements_object/collapse_payment_element
Collapsing the element hides it completely as we're just using the card version now, so there are no tabs at the top. The use case is when a setup intent has been confirmed but there is an issue when the user submits the form to our server. If we return an error or there's a connection issue it might seem confusing to users that they can't edit the card details and click save again.
The "Save" (submit) button is essentially confirming the setup intent (with Stripe) and then immediately submitting the form with confirmed setup intent ID to us. If the second part fails we need to re-initialize the payment element with a new setup intent if the user wants to edit the card details, so it makes sense to just disable the form element.
yeah it's a totally fair question. It also looks like we have styles in the theme sets for when an element is disabled when I force it
I'm not seeing any way to programmatically disable things though and adding disabled to the containing div doesn't do anything
so I have to assume we don't support this. I'll raise the feeback
OK thanks for checking!