#dl-payment-element
1 messages · Page 1 of 1 (latest)
👋 Happy to help
To disable specific fields, you can set in the options when creating a payment element: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields
Designing the payment element can be done via Appearance API: https://stripe.com/docs/elements/appearance-api
Thanks! Sorry, my original question was actually about removing a placeholder for an input field in the Payment Element (e.g., 90210 for the zip code field).
I've seen the Appearance API, but it's not obvious to me how to change the color of placeholders.
re: disabling specific fields, which information is required for a successful payment? Do we need country and postal code, for example?
Ah sorry! I misunderstood your question
Checking how to customise the placeholder now
After checking, the placeholder text can't be changed, but you can customise the placeholder color (not specific to any fields) using colorTextPlaceholder. For example:
const options = {
clientSecret,
appearance: {
theme: 'stripe',
variables: {
colorTextPlaceholder: '#df1b41',
},
},
};
Each payment method has different requirements, so Payment Element is set to automatic for field collection to optimise the payment successful rate
That’s super helpful. Thanks!