- Issue created by @malcomio
- 🇧🇪Belgium tim-diels Belgium 🇧🇪
Hi @shreya_98, thanks for your patch. Please read https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa... → for further help in issue queues for creating patches. The naming of the patch is not as expected. And does it passes all tests?
@malcomio I'm just a co-maintainer that took over the project. So the initial architecture was there already. We could however see if we can change the input type if thats needed and does not break anything. Do you know the pros and cons of the change?
- last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - 🇮🇳India shiv_yadav
elements of type tel are used to let the user enter and edit a telephone number.
- 🇮🇳India Shreya_98
@tiem-diels i had changed the name of patch file according to the naming convention .
- 🇧🇪Belgium tim-diels Belgium 🇧🇪
@shiv_yadav posting the same patch will not get you any credits and is not productive for a maintainer to review. There was no need for a rewrite of the patch. Therefor I'm hiding your patch.
@shreya_98 Thanks for the adjustment.
Lets first discuss if this is even needed before we add this.
- 🇮🇳India Shreya_98
@tim-diels as per my knowledge if we add field type as a "tel" then it will fine for single country if we want globally then we have to add validation and then field type will be "textfield".
- 🇬🇧United Kingdom malcomio
One benefit of using the
tel
input type is that mobile browsers present a more appropriate keyboard when the input is focused.I'm not entirely sure whether it is a good idea, because of the way that the element has two parts.
I can't think of any disadvantages of changing the type, but the comment above from @Shreya_th suggests that it may have an impact on the validation - not sure what that would be though.
- 🇧🇪Belgium tim-diels Belgium 🇧🇪
@Shreya_th please stop spamming this issue. It won't help in getting this committed. This won't be fixed easily. We need to discuss this first.
As malcomio points out, maybe we don't need to do this.
Can someone properly test the whole flow by adding fields and using the tel instead of textfield?
- 🇮🇳India Shreya_98
@tim-diels i'm not spamming this issues actually i wanted to do changes in my comment but unfortunately it saved by mistake without any comment.
- Status changed to Needs review
7 months ago 10:31pm 24 May 2024 - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8last update
7 months ago Waiting for branch to pass - 🇺🇸United States chrisolof
I like this idea. I don't think number is the right type (we'd lose the excellent input format flexibility we have today), but I see no downsides to switching to tel. It sounds like it would have client-side UX benefits and supports all phone number formats (assuming we don't specify a pattern).
I think this also opens up some neat future possibilities. The patch looks fine but needs testing.
Also, related, over in 🐛 Undefined array key "extension" in /src/Element/PhoneNumber.php on line 237 Needs review I'm proposing we switch the extension sub-field type to number.