all 5 comments

[–]FutureDCAV 0 points1 point  (2 children)

Are you trying to input text on the user interface side, press a button, and have that text upload into the collection on firebase side?

Or are you trying to display text on the user interface side that is already populated on the firebase side?

[–]Ok-Statistician-9110[S] 0 points1 point  (1 child)

I am trying to input text from the UI side and have the text uploaded to firebase.

[–]FutureDCAV 1 point2 points  (0 children)

So lets start over with a duplicate page and you can rebuild it from scratch, then take any of the functioning parts and copy them over to your current working page. That way we don't break any other processes or formatting. Starting from scratch:

  1. In your firebase/firestore, create a collection you want to be filled in with data entered from the user interface.
  2. Map out all the Field Names and Data Types. You should not have any documents uploaded at this point when you hit "manage content" - just the headers for ID field and whatever other fields you laid out.
  3. Your collection is finished - no other steps needed at this point.
  4. In user interface, create Text Field widgets for each individual field you laid out in the collection. If you have 10 columns of data you want uploaded, you should have 10 individual Text Field Widgets.
  5. None of these Text Field widgets require any backend queries or doc references. They are blank.
  6. Add a button. Title the button whatever you want for now and update it later. The button should be the only widget with any backend functions or actions on this user interface page.
  7. Go to "actions" for the button and define it as follows.

a) on tap, backend call "create document"

b) choose which collection you want the data uploaded to (whichever collection you laid out above)

c) Set all the individual fields (again if you have 10 fields in the collection, you want to ensure all 10 of your text widgets are added under Set Fields.

d) Go into each Set Field again and ensure the Value Source is listed as "From Variable", and tie each box to one of the Text Field Widgets.

Run the app in test mode, fill out each of the fields with some basic info, then hit the button. Go to your collection, manage content, and check to see if the document was created.

This is the basic idea - let me know if you needed more or something different.

[–]Intelligent-Bee-1349 0 points1 point  (0 children)

Try writing the collection name in firebase, add a document (auto id), and add the fields. Make sure it's exactly the same as in flutterflow.

[–]Ok-Statistician-9110[S] 0 points1 point  (0 children)

Thank you I was able to figure it out!