This topic is locked

Setting Default value for Dropdownbox

11/24/2005 4:53:49 AM
PHPRunner General questions
F
flatdoggy author

Hi,
First of all thanks for previous help on topics I posted they where great! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=2139&image=1&table=forumtopics' class='bbc_emoticon' alt=';)' />
Now I have the following:
Table1: my_options_for_dropdownbox

content: ID,regioncode
Table2: my_new_entries_in_records

content: ID,regiocode
Table3: my_acces_list_for_users

content: ID, user_id, regioncode
I only used Table 1 to get a series of values for the dropdownbox. there is no relation to any table.
What I want to do is when adding a record in a Table2 the default value of the dropdownbox in Table2(regioncode)should be determined by somekind of query on the regioncode in Table3.
So my query would look like: get regioncodefrom Table3 where OwnerID=@_SESSION["OwnerID"]
user_id in Table3 is reffered to as OwnerID in SESSION.
Can it be done?

Sergey Kornilov admin 11/25/2005

Hi,
You can not specify the default value for a dropdown box in PHPRunner.

However you can put your code that will calculate the default value into GetDefaultValuefunction in include/..._functions.php file.