By mikolaskova on
Hello,
i'm using the webform module: in the select list description there is written, that I could use: "Option groups for lists and menus may be specified with . <> can be used to insert items at the root of the menu after specifying a group."
Can anyone link or write me a little expample? I don't understand the syntax of these Option groups and I tried many variants, but none of them works....
Thanks and regards
Adriana
Comments
Same
Same. I would like to know.
Me three. Thanks.
Me three. Thanks.
The example for using the
The example for using the <Group Name> is as follows. In my example I am wanting to separate and group the states that our users will be purchasing our cars from. The options above the Purchasing States group are a list of subjects that we will use to populate the email that gets sent. Heres what the entry in the Options: text box for this select component looks like for us.
Resume|Resume
International|International
Investor-Relations|Investor Relations
<Purchasing States>
california|California
another-state|Another State
etcetera| Etcetera
Not sure how <> can be used to put items at the root or why you would not just list that item first, right after you define the group.
Hope this helps.
Example not working for me
I've tried to use this like the example above, as well as wrapping the options like this -
<Purchasing States>
california|California
another-state|Another State
etcetera| Etcetera
</Purchasing States>
and a few other ways, but I cannot get any groups to appear.
Anyone else get this to work?
Thanks!
I had similar issues then I
I had similar issues then I realised the group options only work for Listboxes. Are you trying to use Listboxes?
With listboxes selected this should process fine:
"Purchasing States" will then appear at the root of the menu.
Hope that helps. Those instructions were so confusing.
Great! It worked fine for me!
Great! It worked fine for me!!
http://iznajmljivanjeozvucenja.co/kontakt
How to select ListBoxes?
In drupal 8 there are only
Text
List (text)
Text (formatted)
Text (formatted, long)
Text (formatted, long, with summary)
Text (plain)
Text (plain, long)
Only there... Where can I get the ListBoxes? So that this approach works.
Pitty that it only does work for listboxes
Couln't be that hard to implement this for the checkboxes as wel, no?
Yeah, I think so.
Yeah, I think so.
Group syntax explained
I've done a bit of testing with this and have come to the conclusion that you must be using the "Select Options(listitems)" type for it to work. < group_name_here > will create a new group under which categories will fall, < group_name2 > will close the last group and open a new one, and <> will close the last group to start root level options. For example