Storing button input and tags and then transfering information to dropdown menu

I’ve been working on a mobile tycoon game, with only UI type thing.
Now i have a problem, which i can’t solve. The game is about phones and tablets and making them.
Anyway i have a panel and a button named New Model then it opens another panel with button like “Name your phone” Amount of RAM, Screen Size and whatnot.
Now i’ve been wondering is there some way i can store what the buttons say and then save that onto a dropdown list (so the user can choose which phone or tablet model he wants).

I forgot to mention that i used Unity UI a bit too much instead of coding.
The system works the way, i have pure simple code which enables and disables panels, if you click on a button button disables, panel enables and the other way around. So when i click the button to change my RAM a small window pops up.
And gives you more buttons to choose RAM, when you click on like 2GB, panels close and the button where before said ram now says 2GB and its tag is now “two”. It’s a bit stupid system, but i’m not that good so that was the only way i could imagine something to work. Maybe there is a way to do this? Or i have to change my system which i really don’t know what else to do.

the system you decide on kinda depends on how far you will be going with menus and sub-menus and info you are collecting. you are describing a simple situation but i assume you will need to keep track of a whole lot more info before your game is done! there are many different systems through coding that can save you a ton of time if you are dealing with a bunch of different buttons. in your situation I would definatly get fimiliar with arrays to hold your info if you are not allready doing that. sorry for using the old GUI display but this should at least show a coding example to show how loops and arrays work to save user input in different menus! this uses an array to represent four menus. inside each of the four, there is another array to represent values. then it saves a corresponding index number for what the user has selected. I hope this gets you thinking in the right direction!!!

int i,i2;
	int[] s;
    string[][] buts;
    void Start () {
		buts = new string[4][];
		buts [0] = new string[]{"red","blue","black","green","white"};
		buts [1] = new string[]{"2gb","4gb","8gb","100gb"};
		buts [2] = new string[]{"chicken","oink","turtle","sasquach"};
		buts [3] = new string[]{"bigfoot is real","i am a nerd","hello world"};
		s = new int[buts.Length];}
	void OnGUI(){
		i = buts.Length;
		while(i>0){i--;
			i2=buts*.Length;*
  •  	while(i2>0){i2--;*
    

if(GUI.Button(new Rect(i150,i240,145,35),buts_[i2])){s*=i2;}}}
i=buts.Length;
while(i>0){i–;_
GUI.Label(new Rect(300,300+(i40),200,40),buts_[s*]);
}}*

or if you wanted buttons to get to the menus you could do something like this:_

* int i,i2;*
* int[] s;*
string[][] buts;
* int menu;*
void Start () {
* menu = -1;*
* buts = new string[4][];*
* buts [0] = new string[]{“colors”,“red”,“blue”,“black”,“green”,“white”};*
* buts [1] = new string[]{“ram”,“2gb”,“4gb”,“8gb”,“100gb”};*
* buts [2] = new string[]{“i am a”,“chicken”,“oink”,“turtle”,“sasquach”};*
* buts [3] = new string[]{“personality”,“bigfoot is real”,“i am a nerd”,};*

* s = new int[buts.Length];}*
* void OnGUI(){*

* if(menu==-1){i = buts.Length;*
* while(i>0){i–;*
_ if(GUI.Button(new Rect(250,i40,145,35),buts[0])){menu=i++;}}}
else{*_

* i=buts[menu].Length;*
_ if(GUI.Button(new Rect(150,i40,145,35),“BACK TO MAIN MENU”)){menu=-1;i=0;}
while(i>1){i–;
if(GUI.Button(new Rect(150,i40,145,35),buts[menu])){s[menu]=i;}}}

* i=buts.Length;
while(i>0){i–;_

GUI.Label(new Rect(300,300+(i40),200,40),buts_[s*]);
}}*

Sorry for the ugly display but this is how arrays and index numbers could work!!!_