Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better tutorial / example needed: How to save and load (display) data #9

Open
rainerlonau opened this issue Jun 1, 2021 · 0 comments

Comments

@rainerlonau
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant