[Question] how to fill field when editing phone number ?
Closed this issue · 3 comments
saifonglee commented
I have got the phone number in this format $countryCode.' '.$nsn: +226 70 20 30 40
I want to set an initial value for the field with this number for editing. but the field needs a PhoneNumber() as initialValue.
what I've done, I put in phoneNumber() the isoCode, and the nsn but it not working.
the field is still empty.
how can I format the international phone number to be able to set as initialValue in phone the form field?
sumitsharansatsangi commented
Try PhoneNumber.parse("+226 70 20 30 40")
cedvdb commented
Indeed, try what was suggested above if you haven't already. I'm going to close this issue for now, feel free to comment back if you are hitting more issues.
saifonglee commented
Thank you @sumitsharansatsangi.
It's now working fine.