Support Forum
Hi Anh - I've read the KB on this, but what I don't see in the instructions is:
thanks
Hi Neil,
Yes, it's possible. Please just change the type
from text
to tel
and you already have telephone field. It's actually a HTML5 input type and I already covered it here.
The Meta Box Builder could not be extended that way. If you create a new field type, it's available for coding only. It won't show in the Builder.
Thx Anh -
I don't know WHERE to change the field type from Text to TEL....? there isn't an option in the builder itself that I can find
Ah, you're using the Meta Box Builder :). I was saying about using code.
In Meta Box Builder, to change the type, please go to Advanced tab, try add a custom attribute type
with value tel
.
so sorry about this....
which field type do I select? there is no option for HTML5 or anything related to text?
see here: https://snag.gy/CX69fH.jpg
please disregard my last note.
Using a TEXT field, I went to Advanced tab and in Attributes I added TYPE and TEL.
after updating, the field still allows me to enter text and numbers are not formatted as a telephone number.
see here:
setting attribute - https://snag.gy/61TK29.jpg
number not formatted as phone number - https://snag.gy/gG3d2n.jpg
field accepts text vs numbers - https://snag.gy/mcPKxk.jpg
Hi Neil,
The tel
input still allows to enter text. In order to force a format, please add another custom attribute with name pattern
and value like [0-9]{3}-[0-9]{3}-[0-9]{4}
(123-456-7890). Then the plugin will use that pattern as a validator for data entered.
Please note that the value is a regular expression, where [0-9]
means only numbers, {3}
means only 3 times. For more info, please read this guide.
Hi Anh - I found the patterns detail on my own yesterday... I was assuming that the pattern allows for real-time field validation. unfortunately the pattern method only validates on submission. 🙁
as always thanks for your efforts here!
Hi,
I'm using the Meta Box Builder for a phone number field, and the number doesn't get formated to a phone number format like the custom attribute mentioned.
Tried both text & number field types, and also added the "tel" type attribute.
How can I get a phone number format properly?
Thanks
Dan
I have a text box that I need to be clickable to call for a phone number. I've tried everything. Should be pretty simple. I have a setting page with client numbers and have selected the number in elementor. I prepended the text with tel: however, it is not calling instead it's going to a broken link. URL doesn't work either.