#mykhaelo_code

1 messages ยท Page 1 of 1 (latest)

wintry pulsarBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1445045966901219329

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

pure lintel
#

๐Ÿ‘‹ Just taking a look to see if there is a way to do this, bear with me a moment

#

Afraid it doesn't look like it's possible to pre-select fields inside this element

torpid cedar
#

But let me know if that doesn't do what you're hoping.

novel hazel
#

Looking

novel hazel
#

It does not work
I made
stripePayByBank.current = createStripePayByBank(stripeElements.current, {
defaultValues: {
billingDetails: {
address: {
country: "fr"
}
}
}
})

Banks are german on checkot page

torpid cedar
#

What is createStripePayByBank? I don't think that's one of our functions.

novel hazel
#

export const createStripePayByBank = (
stripeElements?: {
create: (type: string, style: object) => object
},
options?
) => {
if (stripeElements) {
return stripeElements.create('payment', options)
}
}

torpid cedar
#

Can you share the full screenshot of the Payment Element? Is there a country field shown at all?

novel hazel
#

There is not country field, user need to click on the other bank, then select the country

#

a one country from the list I want to preselect

torpid cedar
#

Ah, I don't think that is prefillable then. Sorry, I thought the Payment Element itself was surfacing a country field, not that it was within the next modal. I can definitely undewrstand the benefit of being able to set that though, and plan to file feedback with the appropriate team suggesting an improvement here. To faciliate that, can you tell me a bit more about the behavior you're seeing, primarily which country is selected by default? (I can't really tell from that UI ๐Ÿ˜… , looks like nothing is selected)

#

Oh, do you have access to a private preview for this payment method? I think that may be why my teammates and I aren't familiar with this offhand.

novel hazel
#

There is Germany selected on this Element, (on the first screen shot you can see only german banks. ) .

#

I don't think I have access to a private preview

torpid cedar
#

Either way, I'll work on getting feedback filed with the team, but based on what I'm seeing so far I wouldn't expect this to work as of now.

novel hazel
#

About preselection, what I need.
Preselect the country, update the country when element is already rendered.
Use case:

  1. The user fills in the checkout form (name, phone, etc.) and selects a country.

  2. Pay by Bank receives the country and renders the banks for the selected country.

  3. The user decides to change the country on the checkout form.

  4. The Pay by Bank widget receives the new country and displays the banks for the updated country.

torpid cedar
#

Thank you for that detail, I'll ensure to include it in the feature request!

#

I've gotten that filed! Apologies that we weren't able to do more today, but I appreciate you raising this gap to us so we can look into closing it.