Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.1.8
-
None
-
None
-
Operating System: All
Platform: All
-
27147
Description
I've needed optgroups in my selection lists. I found that I can wrap wd:item
elements by other elements so I modified woody-field-styling.xsl so that it
creates optgroup elements, when wd:items are wrapped in
wi:group[wi:styling/@type='optgroup']/wi:items
Example:
<wd:selection-list>
<wd:item value="1">
<wd:label>option 1</wd:label>
</wd:item>
<wd:item value="1">
<wd:label>option 2</wd:label>
</wd:item>
<wi:group>
<wi:styling type="optgroup"/>
<wi:label>group I</wi:label>
<wi:items>
<wd:item value="I.1">
<wd:label>option I.1</wd:label>
</wd:item>
<wd:item value="I.2">
<wd:label>option I.2</wd:label>
</wd:item>
</wi:items>
</wi:group>
<wi:group>
<wi:styling type="optgroup"/>
<wi:label>group II</wi:label>
<wi:items>
<wd:item value="II.1">
<wd:label>option II.1</wd:label>
</wd:item>
<wd:item value="II.2">
<wd:label>option II.2</wd:label>
</wd:item>
</wi:items>
</wi:group>
</wd:selection-list>
elements by other elements so I modified woody-field-styling.xsl so that it
creates optgroup elements, when wd:items are wrapped in
wi:group[wi:styling/@type='optgroup']/wi:items
Example:
<wd:selection-list>
<wd:item value="1">
<wd:label>option 1</wd:label>
</wd:item>
<wd:item value="1">
<wd:label>option 2</wd:label>
</wd:item>
<wi:group>
<wi:styling type="optgroup"/>
<wi:label>group I</wi:label>
<wi:items>
<wd:item value="I.1">
<wd:label>option I.1</wd:label>
</wd:item>
<wd:item value="I.2">
<wd:label>option I.2</wd:label>
</wd:item>
</wi:items>
</wi:group>
<wi:group>
<wi:styling type="optgroup"/>
<wi:label>group II</wi:label>
<wi:items>
<wd:item value="II.1">
<wd:label>option II.1</wd:label>
</wd:item>
<wd:item value="II.2">
<wd:label>option II.2</wd:label>
</wd:item>
</wi:items>
</wi:group>
</wd:selection-list>
Attachments
Attachments
Issue Links
- depends upon
-
COCOON-913 [Roadmap] CocoonForms - FUTURE releases
- Open