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)
Getting Checkbox data
gsal
How do I get the data from a group of checkboxes?
<item name="TheOptions">
<option label="One" value"1"/>
<option label="Two" value"2"/>
<option label="Three" value"3"/>
</item>
- George
Find more posts tagged with
Comments
Jens
Try something like this:
var index = item.getValue();
var option = item.getOptions();
var value = option[index].value;
Ciao,
Jens
MattP
try them as individual items. Then use normal iw_value name= syntax.
<item name="Checkbox1">
<label>1</label>
<checkbox required="f"/>
</item>
<item name="Checkbox2">
<checkbox required="f"/>
</item>
<iw_value name="dcr.checkbox1"/>
<iw_value name="dcr.checkbox2"/>
Otherwise a container and an iteration.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
Test_New.zip
Jens
Hi,
my first message was for formapi, here is another for PT:
you can use iw_iterate to loop through the options:
<item name="clarea">
<label>Anzeigebereiche</label>
<description>Wählen Sie die Anzeigebereich in denen die Crosslinks erscheinen sollen.</description>
<database data-type="VARCHAR(10)" />
<checkbox required="f">
<option label="Allgemein" value="1" />
<option label="Produkte" value="2" />
<option label="Vertriebsservice" value="3" />
<option label="Tools" value="4" />
</checkbox>
</item>
<iw_iterate var="clcb" list="dcr.clarea">
<iw_if expr='({iw_value name="clcb"/} eq "1")'>
<iw_then>
.....
Ciao,
Jens