drop down dynamic list set initial value

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

drop down dynamic list set initial value

#1

Postby xren » Fri Apr 04, 2014 1:35 pm

Hi,

I have a dynamic list from a table.

I build the list on my before page script. I also need to set the initial value to one of the item in the list.
e.g. dropdown list country. country_id is the list, display the country name.
after I build the list, I set country_id = xxx and country name=xxx_name
but after page is displayed it displays the first item in the list not the one I set in the script.

How can this be fixed?

Thanks,
Xiaoli
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Fri Apr 04, 2014 1:59 pm

You have to set the value on the field to which the list is attached. If your list is on the country_id field, you must set the value on this field, and the value should be the exactly the same as the corresponding country_id in the list.

Regards
Jon
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Tue Apr 08, 2014 2:08 pm

Thank you.

I have fixed that problem. It is what you said.
0 x


Who is online

Users browsing this forum: No registered users and 5 guests