Problem with subform and ui:add values

Problem with subform and ui:add values

Dear All,

Let me describe my problem which I have with my subform.
As you can see from the image below I have two fields. The first is a lookup field (Excursion_Name) and the second is a dropdown (Optional_Rates1).





In the on user input of the lookup field I wrote the following:

  1. if (row.Excursion_Name  ==  "Included Excursion Land & People")
  2. {  
  3.     row.Optional_Rates1:ui.add("Bus Transfer");
  4.     row.Optional_Rates1:ui.add("Guide");
  5. }
With that it fills the Optional Rates field with two values.

Lets say that I choose 'Guide' and click Submit


If I want to Edit the record then in the On Edit -> On load I wrote again the following

  1. for each r in Subform
  2. {
  3.       if (r.Excursion_Name  ==  "Included Excursion Land & People")
  4.       {       
  5.             r.Optional_Rates1:ui.add("Bus Transfer");
  6.             r.Optional_Rates1:ui.add("Guide");
  7.       }
This is because I want to choose another choice.
Then it shows me the following:



Of course in the dropdown it shows me the 2 choices Bus Transfer and Guide (like the 1st Image) but it fetches the record value (Guide in this example) in a Textbox. 
Why this happens? Why it fetches the 'Guide' in a Textbox and not as a default value inside the dropdown menu?