# How to record the database information from the button

**URL:** <https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465>\
**Category:** Need help\
**Created:** [October 22, 2022, 6:53pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465 "2022-10-22T18:53:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [October 22, 2022, 6:53pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465/1 "2022-10-22T18:53:59Z")

</div>

Hello. Could you tell me how to make and write to the database the choice made by the user. I have a dropdown in which the user selects a value. Depending on the selected value, several options appear at the bottom. From these options, the user selects a value that should be recorded in the database by clicking next. I made a standard button that has a custom state. However, I can’t figure out how to write to the database what is written in the button. Perhaps it was necessary to make not a button, but some other element. Thanks

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/b/6b8e510f5ee9ea8598e17f45ab51814d911cd091.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/d/b/dbc2f2e83b6f2d1c1e2554aa5c8464ce7a21bfa4.png)

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [October 22, 2022, 7:30pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465/2 "2022-10-22T19:30:57Z")

</div>

Hi there, @bluesun440… so, first, I would almost certainly use an option set to define the type options. Then, I would likely use a dropdown (instead of buttons) to display the options. With that setup in place, all you have to do when the _Next_ button is clicked is save the dropdown’s value to a field in a data type (note that the field should have a field type of the option set).

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [October 28, 2022, 2:05pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465/3 "2022-10-28T14:05:09Z")

</div>

Thanks for the answer. Yes, it would probably be more logical to make a drop-down list. But how do I set up the process so that the contents of dropdown 2 depend on what is in dropdown 1? I’m only putting content in the option set for dropdown 2. For dropdown 1, I need to have a list of things in the database and somehow link each item in list 1 to its option set?

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/f/1fd7e5ed98c500e69003894e891a2994052948af.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/0/6/063ce94b7294e7418b7897ebffe53d319f65f3f3.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/c/cceebae0d5bcab87b13ccaf1db49671c5c33492a.png)

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [October 28, 2022, 11:13pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465/4 "2022-10-28T23:13:43Z")

</div>

Just have one option set that defines all of the options. Then, have a field on the `Category` data type that is tied to the option set, and make the field a list. Finally, when you create things in the `Category` data type to define all of your categories, populate each thing’s option set list field with the options that are associated with the category.

---

<div class="post-metadata">

**Author:** ![bluesun440](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bluesun440](https://forum.bubble.io/u/bluesun440)\
**Post date:** [November 1, 2022, 9:39pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465/5 "2022-11-01T21:39:38Z")

</div>

this task make me crazy. Yes, I tried to do what you advised. This really working, thank you so much. But I can’t to connect two dropdowns. In one of them I have all type of categories. In another I have a list with all options sets. And nothing change no matter what category i choose. I have a reference what I try to do, maybe I not correctly explain what I want. In right I have one list. When I choose from this list any item in left list content is change. Thank you and sorry for my intrusive)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/6/b678f90859141000de235443a214b1c9e7335bde.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [December 31, 2022, 6:54pm UTC](https://forum.bubble.io/t/how-to-record-the-database-information-from-the-button/229465/6 "2022-12-31T18:54:11Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
