Back

Separate user name by first and last name?

  • 0
  • Flutter
alza
21 Jul, 2023, 16:50

I'm working on a sign up page where i want to separate the input field for first name and last name. Based on the documentation, it doesn't seem to be possible, so i wanted to check if it is possible in some way/a workaround that isn't mentioned in the documentation?

TL;DR
The user wants to separate the input field for first name and last name on a sign up page using Appwrite. It seems that it is not possible according to the documentation, but there is a workaround: 1. Set the first and last name details in the `user-preferences` object. 2. Alternatively, set the details in a separate collection. 3. Use the `user.name.split(' ')` method to split the user name at runtime. This should achieve the desired result.
Binyamin
21 Jul, 2023, 16:54

The user part in Appwrite is pretty much done for you, meaning any changes you want to do will usually go outside of the user realm.

For your use-case you can

  1. ☑️ Set these details in the user-prefeneces object https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePrefs
  2. Set these details in a separate collection
  3. Set it as the user name and use split it at runtime user.name.split(' ')
alza
23 Jul, 2023, 13:13

Alright, gonna try this. Thanks @Binyamin !

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more