A
A
Andrey Bely2020-11-08 18:22:26
1C-Bitrix
Andrey Bely, 2020-11-08 18:22:26

Problem with field and input mask for phone?

Good evening.
If I place an order under an authorized user, I see the following:
5fa808eb3331d567926801.png
All blocks are collapsed and the fields are automatically filled.
If for some reason the user wants to change something in his data, then by clicking on the "Change" button, I see:
5fa8093136d5e641936919.png
And you can see that the number has been substituted starting from 7 (from 7 digits 11), because there is a mask in this field, only 10 digits fit, because of this, the last digit 2 is simply cut out.
After all I see:
5fa80a7dc50ca874582236.png
Instead of +7 (937) 986-48-92 I got +7 (793) 798-64-89.
The client has automatic delivery of content via SMS on the number. I tried to cut this 7 at the beginning of the line through the OnSaleComponentOrderProperties event, but I realized that if the user does not want to change any data, then a number of this kind 937 986-48-92 is not suitable.
The task seems to be trivial, but even I have stalled on it, throw some ideas please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-11-09
@just_guy95

It looks like normalizing a phone number, try setting the USE_PHONE_NORMALIZATION = N parameter in the component

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question