1 Reply Latest reply: Jan 13, 2010 9:09 AM by decpariem RSS

    Combobox

    decpariem Community Member

      hello there.

       

      i am having a problem with the combobox component.

      i have a mysql database with a student and a class table.

      i want to make a registration form for the student. i have the combobox here where he

      picks his class (populated from the  class table). The class_id is a foreign key to the student table and

      it's invisible in the combobox. i want when the students registers from his selection on the combobox

      to write in the database the corresponding class_id.

        • 1. Re: Combobox
          decpariem Community Member

          well i managed to do this alone.

          here is the solution,

          i populated the combobox with the addItem method and the class_id as the data.

          then in the submit button i traced the selection selectedItem.data.

          so easy and obvious.