I've been working on a website for a humane rescue that centers around adopting out rescued dogs & cats. Thus, the application form used to find adoptive homes is critical to the mission.
You can see it here: https://baccr1.wixsite.com/website/application
The director really, really wants the phone number input fields to be formatted as (nnn) nnn-nnnn instead of having all the numbers run together. How can this be done? If not on the input field then on the form submission available via the dashboard?
I've looked at other posts talking about regex but it makes no sense to me. Please help.
Thanks in advance.
I see you have a poor choice of options, and as a specialist in this sphere, I can provide you with more info (I hope you still find it helpful). The good way to achieve it is by using regular expressions (regex). It's not that confusing if you learn more.
Many online resources can help you learn about regex and how to use it for formatting phone numbers. You can also find pre-built regex patterns that match phone numbers in the desired format or use uk temp number. Alternatively, you could use a library or plugin that already has this functionality built-in.
Chen, we are animal rescuers, not website developers. We selected Wix because it is supposedly easy to use for newbs. Formatting a phone number should be a simple no-brainer. We have no experience with an npm package or whatever you are referring to but if it is an easy fix then please tell us how to do it.
Thank you.
Have you consider using a npm package for this purpose?
For instance, check out libphonenumber-js.