#Perry
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
would you mind elaborating a bit more?
ExpressCheckoutElement doesn't get added by itself
so i would like to disable the ExpressCheckoutElement button, i see that we can change height and type of button but disabling option is not given?
it gets added, i can see that button, but would like to disable it, on one condition, form required fields should be completed then only i need to enable to button
bcz on click of ExpressCheckoutElement button i am submitting the form, but before that we have lots of input fields (like personal details) to fill in
what's the error you're getting?
TypeError: stripe_react_stripe_js__WEBPACK_IMPORTED_MODULE_2_.ExpressCheckoutElement.update is not a function. (In 'stripe_react_stripe_js__WEBPACK_IMPORTED_MODULE_2_.ExpressCheckoutElement.update({
disabled: true
})', 'stripe_react_stripe_js__WEBPACK_IMPORTED_MODULE_2_.ExpressCheckoutElement.update' is undefined)
Also i see in node modules package, cardelement has update option with disabled feature, but ExpressCheckoutElement doesnt
hmmm yes you're right, apparently this works with paymentRequestButton but not with expressCheckoutSElement
I'm not sure why though
hmm yeah bit strange, for both the button disabled should be enabled, but okay let me check if i can get a work around
Thank you ๐
I'm asking around for you, I'm hopeful to get an answer as this intrigues me myself and I ๐
Oh that is really helpful ๐ please let me know in the same inbox, if this can be kept open for a while
would you mind me asking when exactly do you want to disable the ExpressCheckoutElement?
on page load
in that case, this might help https://stripe.com/docs/elements/express-checkout-element/migration?client=react#ready-event
yes, i did refer this, but it will show and hide the button
that's the best approach
what i can do is, may be wrap the button with div and set pointer events none and opacity to faded color on that div, hopefully that will help
yes that could work too
let me know if you need any more help
Thank you, as of now i am good to go ๐