#nadiya-elements-fields
1 messages · Page 1 of 1 (latest)
i'm sorry, i'm quite new to this, if you know any demo github repo using the above? that would be super helpful
I don't have a specific repo or demo no, but it is simply passing the right parameters in JS. So it'd look like this const paymentElement = elements.create( 'payment', { fields: { billingDetails: { address: { country: 'never', postalCode: 'never', } }, }, } );
i've to follow the same procedure from this doc, but instead of creating card element, i've to create a payment element?
I don't know which doc you are using here
you explicitly asked about the country field which is for PaymentElement. The card element doesn't have that
really if you are just getting started, read https://stripe.com/docs/payments/accept-a-payment and ignore any other doc
yeah, sorry ! i was confused about the different doc and i figured it out later
Now, another question
i've created the payment page with the the above doc that you provided, and i think i almost followed the same doc, but the elements are showing inline
yeah you're not using the docs I mentioned at all if you get that UI
What do you call "inline" and what do you expect instead?
i would like to have something like this
i'm not sure if i miss anything obvious here
You need to decrease the width of the parent element, right now it's the full page's width so it's all on one line
you have to control the parent element's width in HTML/CSS
ah yes, silly me, that helps
Thank you so much for your time
Of course!
sorry, another question!
is the label name on the payment elements changeable?
Can you be specific - which label name?
Gotcha - no, there isn't a way to change those labels
same with placeholder text too?
With Payment Element I don't believe there's a way for you to set that either