opt group in dropdown

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

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

opt group in dropdown

#1

Postby dvanhussel » Wed Apr 03, 2013 12:05 pm

Hi,

In plain HTML it is possible to have optgroups in a dropdown:

Code: Select all

<select>
  <optgroup>
    <option>Volvo</option>
    <option>Saab</option>
  </optgroup>
  <optgroup>
    <option>Mercedes</option>
    <option>Audi</option>
  </optgroup>
</select>
(apparently, labels are stripped out by the forum software, see: http://www.w3schools.com/tags/tag_optgroup.asp for an example of optgroups )

Is it possible to add optgroups to ebase-dropdown form-fields? Of course it can be done with HTML and then read the selected value with Jquery, but I would like to use a 'regular' ebase field.
0 x

LKirby
Ebase User
Posts: 37
Joined: Wed Mar 13, 2013 11:33 am
Contact:

#2

Postby LKirby » Wed Apr 03, 2013 12:45 pm

Have you tried creating a field and assigning a static list to it in the field properties and setting the type as 'Drop Down' ?

Image
0 x

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#3

Postby dvanhussel » Wed Apr 03, 2013 1:07 pm

LKirby wrote:Have you tried creating a field and assigning a static list to it in the field properties and setting the type as 'Drop Down' ?
Thanks for your reply.

Yes, I know how I can add values to a dropdown list. (In this case, I populate the list in JavaScript with createCustomList())

What I want, is also add some optiongroups to the list.

I can't find any documentation on that.
0 x

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

#4

Postby Jon » Wed Apr 03, 2013 1:19 pm

Sorry, there's no Ebase support for optgroup, you'd have to do it yourself.
0 x

Dave
Ebase Staff
Posts: 89
Joined: Mon Sep 10, 2007 11:48 am

#5

Postby Dave » Thu Apr 04, 2013 10:52 am

Guess you could use a treeview widget too for the same sort of effect, e.g. http://forum.ebasetech.com/forum/viewtopic.php?t=359

Hopefully we're about to post an example of this... :D
0 x


Who is online

Users browsing this forum: No registered users and 10 guests