#deaa

1 messages · Page 1 of 1 (latest)

fast nacelleBOT
winged bison
#

What do you mean by 'disable'? Prevent clicking of a specific wallet button?

royal crown
#

yes

#

for example prevent click if he didnt fill email

winged bison
royal crown
#

yes

#

but not working

#

i used this code

#

apple_pay_button.on('click', function(event) { console.log('apple_pay_button click'); console.log('apple_pay_button clicked', _self.processing); if (_self.processing) { console.log('apple p[ay] stooped'); event.preventDefault(); return; } });

#

but the event not firing

winged bison
#

You're going about this the wrong way. Check the link I sent, you need to track validity of your input(s) and apply attributes/styling accordingly via JS

royal crown
#

i checked your link

#

i didnt find how to check the user input

winged bison
#

There's no specific example for how to do that, you'd need to adapt the code to fit your requirements

royal crown
#

i need to check after setup the stripe button

#

so i need way like "clieck" event to check

#

or can i disable the button based on another input

#

like this
apple_pay_button.disable();

winged bison
#

No, there's no disable method or similar. You'll need to use JS to look up the HTML element where you mount the button and disable it. Maybe:


btn.setAttribute('disabled', true)
royal crown
#

ok, thank you
i will try it