Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Required items inside an OR-Replicant
waldemar
Hm, we have an interesting Templating issue with mandatory fields:
<item name="Navigation">
<description>.....</description>
<replicant min="0" max="1" combination="or">
<item name="option1">
<label>Option1</label>
<select required="t">
[some CODE]
</select>
</item>
<item name="option2">
<label>Option2</label>
<select required="t">
[some CODE]
</select>
</item>
</replicant>
</item>
Although both of these options are *required* it is possible to leave the replicant with NULL items and save the dcr. I can not make the replicant or the item itself required; so what would be a solution to this behavior? I would like the user to have to choose one of these options...
waldemar
esolut
Find more posts tagged with
Comments
jbonifaci
Set the min to 1?
LooseCannon
Setting the max attribute of the replicant element to "1" defeats the purpose of having a replicant. Since you're just using the replicant to group common items and not "replicate" items, a container element should be used.
fred_sanford
agreed. setting the min="1" will require at least one replicant.
You big dummy!