Default selection in pull-down menu

A

asher

Guest
Hi,

When using a select_single as a field type and a foregin key I am able to get a select pull down menu with the options. This is not the problem. But I want the previosly selected value to be the default choice. For example, if I have choices "a", "b" and "c", and this record already has value "b", then the edit filed should look like this:

<option value="1 - a">
<option value="1 - b" SELECTED>
<option value="1 - c">

Is this possible? How can I do this?

Here is the information I have in "Foreign key field", just in case that helps:
SQL: select sq_id, description from translator

Thanks!
 
J

John Steele

Guest
I too have the same problem, and also a feature suggestion. It would also be nice to simply display the values, keeping the id's hidden from the user.
 
A

A.B.

Guest
I'm having the same problem and turned to this forum for help. Anyone?

Thanks
 
I

Ivan Mortensen

Guest
<option value="1 - a">
<option value="1 - b" SELECTED>
<option value="1 - c">

try :

in "Option to include:" ~1 - a~1 - b~1 - c~

in "Default value:" 1 - b
 
E

Eugenio

Guest
asher wrote:
>
> Hi,
>
> When using a select_single as a field type and a foregin key
> I am able to get a select pull down menu with the options.
> This is not the problem. But I want the previosly selected
> value to be the default choice. For example, if I have
> choices "a", "b" and "c", and this record already has value
> "b", then the edit filed should look like this:
>
> <option value="1 - a">
> <option value="1 - b" SELECTED>
> <option value="1 - c">
>
> Is this possible? How can I do this?

At the moment it isn't possible, to be selected your field must have a value of "1 - b".

Eugenio.

(Latest version of DaDaBIK when this message was posted: 2.2.1)
 
Top