Hi there,
I´m using firestore to save the data from my registration form.
What´s the best way to get and save data from the FormBuilderPhoneField and then load and display it again.
I´m using
onChanged: (value) {
_user.phone = value;
}
to save the value from the FormBuilderPhoneField. But this is the complete number, e.g. +491621234567.
This is saved into the database and I guess this is wrong already. Because I would need the countrycode (+49 is for Germany, which is 'DE') and the phone numeber, in this case 1621234567. With these two values I could then set the defaultSelectedCountryIsoCode to 'DE' and show only the number '1621234567' in _textEditingControllerPhone.text.
But right now I get the full number, save that and when I open the settings page in my app the FormBuilderPhoneField shows +49 +491621234567
How do I get the countrycode? How do you save the data? Thanks
Hi there, I´m using firestore to save the data from my registration form. What´s the best way to get and save data from the FormBuilderPhoneField and then load and display it again. I´m using
to save the value from the FormBuilderPhoneField. But this is the complete number, e.g. +491621234567. This is saved into the database and I guess this is wrong already. Because I would need the countrycode (+49 is for Germany, which is 'DE') and the phone numeber, in this case 1621234567. With these two values I could then set the defaultSelectedCountryIsoCode to 'DE' and show only the number '1621234567' in _textEditingControllerPhone.text.
But right now I get the full number, save that and when I open the settings page in my app the FormBuilderPhoneField shows +49 +491621234567 How do I get the countrycode? How do you save the data? Thanks