# How to save text inputs to Firebase?

**URL:** <https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262>\
**Category:** Questions about Thunkable X\
**Created:** [December 31, 2022, 4:17am UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262 "2022-12-31T04:17:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [December 31, 2022, 4:17am UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/1 "2022-12-31T04:17:28Z")

</div>

How would I save a series of text input’s on a screen to Firebase? I have 5 onboarding screens with a list of questions the user needs to fill out that I need to capture.

Would I use cloud variables and use create object with fields like this example?

 ![Screenshot 2022-12-30 at 11.14.32 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed9a7feb96088f6f808ba186296c25a9a5d85b4b.png)

![Screenshot 2022-12-30 at 11.12.28 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/c/2c468be3f2fd255ed22b9ebd66a87f0403a314dd.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 31, 2022, 3:40pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/2 "2022-12-31T15:40:00Z")

</div>

Yep!

I would use a structure like this

 ![Screen Shot 2022-12-31 at 10.44.37 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/8/c8e9159ccbf164b3fc47967aae4e4a2dd6ab45e6.png)

---

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [December 31, 2022, 4:00pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/3 "2022-12-31T16:00:36Z")

</div>

Thanks Jared! It’s starting to make sense finally!

 ![Screenshot 2022-12-31 at 10.59.39 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/0561fa2de2b06967a8966c3aeb83495142421429.png)

![Screenshot 2022-12-31 at 11.00.01 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/c/4c1dd4efbf8f9ab252bd7faf9c0a98452e6491bf.png)

---

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [December 31, 2022, 4:14pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/4 "2022-12-31T16:14:42Z")

</div>

Also - I have this dropdown thing for intensity. The Intensity of training is a button and when that is clicked it shows 4 different options that I need saved as well. But i realized the tutorial i went through had these as app variables instead of cloud variables.

What’s the best way to get these dropdowns stored like the text input fields?

![Screenshot 2022-12-31 at 11.09.56 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/b/2bcecf3fa6879fa53fe22e04eb08efb21ffa04c8.png)

 ![Screenshot 2022-12-31 at 11.10.34 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/f/df2d021e7b73e03e02299721a3c549a03bef39fc.png)  
 ![Screenshot 2022-12-31 at 11.12.15 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/9/5938850f37882b2ed23de76697ce93738ae0ad2a.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 31, 2022, 6:19pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/5 "2022-12-31T18:19:40Z")

</div>

When you say “drop downs” I assume from your screenshot you mean a List Viewer.

When a user clicks on a listview item, their choice is stored in a green “item” block. You can assign this block to an app variable and then store that variable in Firebase just like you’ve done with the text input blocks.

---

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [December 31, 2022, 6:37pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/6 "2022-12-31T18:37:35Z")

</div>

> [@tatiang](#):
>
> y “drop downs” I assume from your screenshot you mean a List Viewer.
> 
> When a user clicks on a listview item, their choice is stored in a gr

Yes, it’s a list view. So would the code block look like this?

 ![Screenshot 2022-12-31 at 1.35.55 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/7/e7d8263a5a9a1170f195bf4aaa6a97da8591457c.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 1, 2023, 12:25am UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/7 "2023-01-01T00:25:10Z")

</div>

These two things have to be the same, either a variable or a text input’s text. I would use a variable but that’s up to you.

 ![Image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/d/fd2eac588eaf55aab1b4dc238ae4bd8190c0ce00.jpeg)

---

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [January 1, 2023, 12:43am UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/8 "2023-01-01T00:43:30Z")

</div>

Okay, thanks. I’ll have to keep playing around with it. I just don’t understand what I need to do with the blocks to make this work.

Is this how you assign the listview item block to an app variable?

![Screenshot 2022-12-31 at 7.58.56 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/1/81987e2ff827d75dc1a428d8fee228c835af0918.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 1, 2023, 3:43am UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/9 "2023-01-01T03:43:52Z")

</div>

No. And I’m sorry I haven’t been able to provide a screenshot of blocks. I’ve been away from my computer for a couple days.

Set app variable Gender to [item].

The [item] block is green and you just drag it from the “when list viewer item is clicked” event block.

 ![Image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/5/85785bdafa96c21c841f6026a0a891e29fc03bad.jpeg)

So the left side of your screenshot is correct (setting a variable value) but the right side is not. It needs to be the [item] block. And that block can only be used inside of the “when list viewer item is clicked” event block.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 1, 2023, 5:22am UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/10 "2023-01-01T05:22:25Z")

</div>

Like this:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/f/7f89e779548c210444a86c36afb562791e4c9b4e.png)

---

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [January 1, 2023, 12:08pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/11 "2023-01-01T12:08:30Z")

</div>

> [@tatiang](#):
>
> ng a variable value) but the right s

You’re awesome! Thank you so much. I finally have it writing to Firebase.

---

<div class="post-metadata">

**Author:** ![mikew1944](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mikew1944/32/143983_2.png) [@mikew1944](https://community.thunkable.com/u/mikew1944)\
**Post date:** [January 1, 2023, 1:57pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/12 "2023-01-01T13:57:13Z")

</div>

Thanks for getting me started with the structure!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 1, 2023, 1:57pm UTC](https://community.thunkable.com/t/how-to-save-text-inputs-to-firebase/2199262/13 "2023-04-01T13:57:43Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
