#How to store additional data like phone, location, and address while signing up.
8 messages · Page 1 of 1 (latest)
If its just small amount of information, then yes use the User Preference.
But the User Preference has limit of 64KB for the total size, so if it bigger then that creating anouthr collection would be the best
yes its a small amount of data like three or four field with 50 words each
So User Preference well suit you
as i go through doc but not found how to implement.
To get the preference
https://appwrite.io/docs/client/account?sdk=web-default#accountGetPrefs
To update
https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePrefs
So you would do something like this
const prefs = await account.getPrefs();
prefs['phone'] = '1234';
await account.updatePrefs(prefs);
but how to create while sign up
For that create a function the listen to the event of user creation and then do something like this
users.updatePrefs('[USER_ID]', {});