This topic is locked

Dynamic phone number and zipcode formats

7/11/2022 3:55:01 AM
PHPRunner General questions
A
asawyer13 authorDevClub member

I have a country table. In my customer edit form I have the user enter the country code the customer is in. I would like the zip code and phone number to have the edit mask for that country. How can I accomplish this

thanks

Alan

Sergey Kornilov admin 7/11/2022

I'm not sure about changing the mask but you can definitely apply dynamic validation and display different messages depending on other field values. I would suggest using Field Events for this kind of dynamic validation.

fhumanes 7/11/2022

Hello,

For telephone numbers there is a plugin that helps the introduction of the number.

You can access the plugin at: https://fhumanes.com/blog/guias-desarrollo/plugines-de-phprunner/

Cheers,
fernando

A
asawyer13 authorDevClub member 7/12/2022

Fernando,
I like your plugin, but it doesn't require the user to actually use the format. For example, if I pick USA, I don't actually have to fill up all the phone number field. I can leave part of the number blank. Is there a way to correct that?

Alan