#sarita_21302
1 messages · Page 1 of 1 (latest)
When creating the PaymentElement, you can disable the email field:
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-email
This is my code
const paymentElementOptions = {
layout: "tabs",
email: "never"
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
but the email field is still visisble
Is it under billingDetails?
you're using a linkAuthenticationElement, that element specifically collects an email address, it's what it does.
you are already using a PaymentElement. You're using a LinkAuthenticationElement(that is the part of your page that has the email input) and you're using a PaymentElement(that is the part of the page with the card number inputs). See the diagram linked just above. That is what you built, what is described in that guide.
Can see that now. Thanks
One more question - If I want to change the layout from tab to showing button like below attachment and card elements after the buttons, how can I achieve that?
you would need to integrate with the ExpressCheckoutElement https://stripe.com/docs/elements/express-checkout-element
Can this design be achieved using payment elements, if not all at least the card information section?
sure that's totally possible
the top part is ExpressCheckoutElement, and the bottom part is a PaymentElement.
also since that screenshot is simply Checkout, maybe simply use Checkout? Or investigate using the embedded mode of Checkout : https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=embedded-checkout
Can you please share doc for styling/editing payment elements? For example - I'll have to hide the 'expiry' label
you can't hide it