How to Create a Pre-Registered User System in FlutterFlow with Firestore?

Actions & Logic

Hi everyone!

I’m trying to build a registration system in FlutterFlow where users can enter a pre-assigned ID, and the system will check if the ID exists in a Firestore collection (preregistered_users). If the ID is found, the user should be redirected to a registration screen with their details (name, other two values) pre-filled from the Firestore document.

Here’s what I’ve done so far:

  1. Created a Firestore collection preregistered_users with fields: id, name, grade, school.

  2. Added a screen with a TextField for ID input and a button to trigger the Firestore query.

However, I’m stuck on:

  • How to pass the retrieved data to the registration screen and pre-fill the form fields.

  • How to handle cases where the ID doesn’t exist in Firestore.

  • How to retrieve values from the firestore document

Could someone guide me step-by-step on how to achieve this? Any tutorials, examples, or code snippets would be greatly appreciated!

Thanks in advance!

What have you tried so far?

As I don't know how to do it I checked forums, AI and some tutorials but nothing about my use case.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
1 reply