#vdumitraskovic
1 messages ยท Page 1 of 1 (latest)
๐ Don't know how autocomplete affects this but there should be a way to handle validation errors by listening to events on the AddressElement as shown in the docs here
https://stripe.com/docs/elements/address-element/collect-addresses?platform=web#web-retrieve-address
Disabling autocomplete does not help.
I can listen to error events, but I can't interact with a single field.
autocomplete relies on Google Maps API Places library.
Can you check if there are any outgoing requests being blocked?
If you have CSP configured, that might affect the feature too
https://stripe.com/docs/elements/address-element/collect-addresses?platform=web#autocomplete:~:text=Note-,If youโve deployed,-a CSP and
also do you have an example page I can take a look at?
This is the exact situation that I'm describing. The form is incomplete, but since the address part is not fully expanded, to a user everything seems fine. But it is not. If I add another letter to the line1, error is correctly shown.
It should rarely occur, TBH, but we would like to prevent this from stopping users to subscribe.
Also for some reason, the state/zip layout is different from one that can be seen on the documentation page, and I can't find a way to control that layout.
I've found issue with layout. I just need to set at least 441px of width. Sorry about that.
Ah glad you found it
There is still the issue with the incomplete address ๐ฆ
In order for autocomplete/suggestions to work, there needs to be atleast 3 characters in the input field. Could be due to the limitation from the underlying Google Maps API.
Can you try adding the change event listener and see if it returns complete true for only two characters in the line 1 field?
I hear you, but that is not the problem. Autocomplete works as expected. But there is a problem that there is no clear indicator that the address is not complete, and the user might not have an idea that he needs to complete the address before continuing. I'm calling elements.submit() which correctly marks all incomplete fields, except address that has to letters.
I even tried disabling autocomplete with the configuration, but I get the same result.
Right, I'm trying to narrow down on why the validation isn't prompting for incorrect address on submit.
Ideally the change event listener should return complete: false which should then trigger validation error near the line 1 field, but if that's not happening then that's something I can flag internally and get some more clarity on.
I'm juggling with a few threads at the moment so can't test myself.
No worries. Thank you for your patience and support.
LMK if you're able to test adding a change event listener and see if it returns complete: true incorrectly
It returns complete: false
Interesting. Let me check with a teammate and see if there are any workarounds. Most likely we'll need to loop in our product team for this.
Hey there, I'm helping hanzo and testing this put right now
I see the same behaviour as you, generally, and I think I agree that the collapsed line1 could be improved with an incomplete error message on submit
Can you say more about this:
I even tried disabling autocomplete with the configuration, but I get the same result.
@oblique ether are you still around?
Yes, I'm around
Of course, what info do you need?
This ๐
For now, I don't think there will be an alternative beyond handling the incomplete_address error and surfacing this yourself
I'd like to file feedback to improve this though, but I want to make sure what I share reflects what you expect
It seems like what would be helpful is a similar error state/message surfaced on the collapsed line1 field to prompt the user to continue filling in their address
Is that accurate?