jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. Now includes React and Vue components.
https://intl-tel-input.com
MIT License
7.58k stars 1.94k forks source link

On Post Request not getting the full number . #1472

Closed shabyis closed 11 months ago

shabyis commented 11 months ago

I have saved the full number in first try that look like this:

image

But second time when i submit the form again it give me the number without country code and an additional 0

image

That is causing the validation issue in some cases.

Can you guide how to get full number in php after submiting the form

jackocnr commented 11 months ago

If you're using old-school form submits that reload the page, then see the hiddenInput option for getting the full international telephone number.

If you're using modern ajax requests, then you can get the full number with getNumber method.

Does that answer your question? I'll close this for now, but feel free to re-open if you're still having problems.