# Combobox within form - woe is me :(

**URL:** <https://forum.kirupa.com/t/combobox-within-form-woe-is-me/228316>\
**Category:** Uncategorized\
**Created:** [June 6, 2007, 8:36pm UTC](https://forum.kirupa.com/t/combobox-within-form-woe-is-me/228316 "2007-06-06T20:36:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kellyno](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kellyno](https://forum.kirupa.com/u/kellyno)\
**Post date:** [June 6, 2007, 8:36pm UTC](https://forum.kirupa.com/t/combobox-within-form-woe-is-me/228316/1 "2007-06-06T20:36:52Z")

</div>

I followed Kirupa’s form tutorial to a tee - or so I thought. Can anyone help me make something other than ‘undefined’ show up when I choose from my comboboxes?

```auto
stop();

cancel_btn.onRelease = function (){
  gotoAndStop("Scene 1", 1);
};

myLabels = new Array ("today", "yesterday", "two days ago");
// Populate the listbox
for (i=0;i<myLabels.length;i++) {
    date.addItem (myLabels*) ;
}

function comboDisplay (component) {
    combodate = component.getSelectedItem().label ;
}
// assign the function to the combobox
date.setChangeHandler ("comboDisplay") ;

myLabels = new Array ("choose category", "food", "clothes", "entertainment", "self", "gift", "household");
// Populate the listbox
for (i=0;i<myLabels.length;i++) {
    category.addItem (myLabels*) ;
}

function comboDisplay2 (component) {
    combocat = component.getSelectedItem().label ;
}
// assign the function to the combobox
category.setChangeHandler ("comboDisplay2") ;

where.text = "";
amount.text = "";

onSubmit = function () {
    loc = where.text;
    amt = amount.text;
    _root.gotoAndStop ("result");
}

```

Here’s what I have at ‘result’ - the two textboxes work, but not the two comboboxes:

```auto
stop();
result.text = loc+"
";
result.text+= combodate+"
";
result.text+= combocat+"
";
result.text+= amt;

```

Any idea what’s wrong with this picture?
