#chukd

1 messages · Page 1 of 1 (latest)

chrome yarrowBOT
lament hill
#

Hi there. What's the issue you're facing?

sly obsidian
#

I can't get floating labels to float! Here is a Stackoverflow I posted - https://stackoverflow.com/q/75625511/1186050 and my Stackblitz showing all the working code - https://stackblitz.com/edit/angular-dwmaya?file=src/test/stripe/stripe.component.ts

StackBlitz

A angular-cli project based on @angular/animations, @angular/common, @angular/compiler, @angular/core, @angular/forms, @angular/platform-browser, @angular/platform-browser-dynamic, @angular/router, core-js, rxjs, tslib and zone.js.

#

maybe you can help? IDK!

lament hill
#

So that code looks like it's just the bootstrap forms

#

Do you have a sample with Elements that isn't working as expected?

sly obsidian
#
StackBlitz

A angular-cli project based on @angular/animations, @angular/common, @angular/compiler, @angular/core, @angular/forms, @angular/platform-browser, @angular/platform-browser-dynamic, @angular/router, core-js, rxjs, tslib and zone.js.

lament hill
#

No I need to see the code that isn't working

#

I need to see your Stripe Elements code that you said doesn't work as expected

#

Not bootstrap code

sly obsidian
#

I'm not sure I understand your question. The Stackblitz link has non working code in it. I just updated it to show a name field at the top that has floating labels that work and all the Stripe fields below are not working. Did you want something else in terms of code?

flint cliff
#

👋 hopping in here - give me a minute to catch up

sly obsidian
#

sure, no problem

flint cliff
#

Hmm... Let me try some things - I don't actually know if you can do floating labels with the Card Element

sly obsidian
#

oh ok, let me know if you can figure something out?

flint cliff
sly obsidian
#

I saw those but the code and CSS are long and nightmarish.

flint cliff
#

As far as I know, that's the only way to do it - what you've tried (with passing in appearance: { labels: 'floating' } ) won't work because it's not supported with the CardElement

sly obsidian
#

oh ok.

#

what about Iban?

#

and where did you find that says the CardElement isn't supported?

flint cliff
#

The Elements Appearance API doesn’t support individual payment method Elements (such as CardElement). Use the Style object to customize your Element instead.