#Perry

1 messages ยท Page 1 of 1 (latest)

tall wraithBOT
tropic arch
#

๐Ÿ‘‹ happy to help

#

would you mind elaborating a bit more?

#

ExpressCheckoutElement doesn't get added by itself

icy remnant
#

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?

tropic arch
#

why do you want to disable it though?

#

I'm not sure I understand the use-case

icy remnant
#

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

icy remnant
#

let me check

#

cannot be done on ExpressCheckoutElement element

tropic arch
#

what's the error you're getting?

icy remnant
#

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

tropic arch
#

hmmm yes you're right, apparently this works with paymentRequestButton but not with expressCheckoutSElement

#

I'm not sure why though

icy remnant
#

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 ๐Ÿ™‚

tropic arch
#

I'm asking around for you, I'm hopeful to get an answer as this intrigues me myself and I ๐Ÿ™‚

icy remnant
#

Oh that is really helpful ๐Ÿ™‚ please let me know in the same inbox, if this can be kept open for a while

tropic arch
#

would you mind me asking when exactly do you want to disable the ExpressCheckoutElement?

icy remnant
#

on page load

tropic arch
icy remnant
#

yes, i did refer this, but it will show and hide the button

tropic arch
#

that's the best approach

icy remnant
#

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

tropic arch
#

yes that could work too

icy remnant
#

Yes that is working, just checked ๐Ÿ™‚

#

better way to go ๐Ÿ˜„ Great, thank you

tropic arch
#

let me know if you need any more help

icy remnant
#

Thank you, as of now i am good to go ๐Ÿ™‚