Dropdown question - How do I not show the first entry in a dropdown list as blank?

1 view
Skip to first unread message

greavette

unread,
Feb 26, 2010, 4:22:38 PM2/26/10
to Simple Groupware
Hello,

Learning a lot here, but back again for another lesson. I've created
a new module (called Pulp Inventory based upon the Inventory module).
I've been successful in adding the new module to SGS and I've added a
new sub-folder to this module (essentially a second module called
Clients) and it's working great.

But I do have a question about how the clients dropdown looks. When I
add a new Client to my Clients module, and then create a new entry in
my Pulp Inventory module, the clients dropdown in my Pulp Inventory
module shows the first entry in my clients dropdown by default. I
would rather it show a blank in the Clients dropdown first until the
user clicks the down arrow to show the entries in the dropdown.

Can you tell me how to do this?

Here is my xml code from Pulp Inventory:
<field name="clients" displayname="Clients" simple_type="select"
simple_size="1" required="true">
<data function="dbselect|simple_clients|clients,clients||clients
asc|10"/>
<link value="index.php?find=asset|simple_clients||
clients=@clients@&amp;view=display"/>
</field>

Here is my xml code from the Clients module:
<field name="clients" displayname="Clients" simple_type="text"
is_unique="true" required="true">
<linktext views="display" value="#index.php?
view=details&amp;iframe=1&amp;item[]=@id@"/>
<readonlyin views="edit"/>
</field>

Is there something I can add to one/both of these to make it work?

Thank You.

Thomas

unread,
Feb 26, 2010, 4:34:35 PM2/26/10
to Simple Groupware
Hello,

you can remove <required="true"> from the code:


<field name="clients" displayname="Clients" simple_type="select"
simple_size="1">

bye
Thomas

greavette

unread,
Mar 1, 2010, 11:05:29 PM3/1/10
to Simple Groupware
That did it Thomas. I should have caught that.

Thanks for pointing the out to me!

Charles.

Reply all
Reply to author
Forward
0 new messages