Hi All,
I want to create multiple checkbox in the DCT and default them to checked, and hide them
Assume that the containers that hold the checkboxs are labeled correctly. when I try to setValue to multiple checkbox, I found that only the 1st one been checked. the other 6 checkbox still remain uncheck.
<script>
<![CDATA[
var show_tab = [0];
IWDatacapture.getItem("/products/tabs/benefits/show").setValue(show_tab);
IWDatacapture.getItem("/products/tabs/howitworks/show").setValue(show_tab);
IWDatacapture.getItem("/products/tabs/pricing/show").setValue(show_tab);
IWDatacapture.getItem("/products/tabs/sellscript/show").setValue(show_tab);
IWDatacapture.getItem("/products/tabs/faq/show").setValue(show_tab);
IWDatacapture.getItem("/products/tabs/termsandconditions/show").setValue(show_tab);
IWDatacapture.getItem("/products/tabs/promotions/show").setValue(show_tab);
//for debug purpose, I disble the hide code
//reason is I want to check the value of the checkbox
//IWDatacapture.getItem("/products/tabs/benefits/show").setVisible(false);
//IWDatacapture.getItem("/products/tabs/howitworks/show").setVisible(false);
//IWDatacapture.getItem("/products/tabs/pricing/show").setVisible(false);
//IWDatacapture.getItem("/products/tabs/sellscript/show").setVisible(false);
//IWDatacapture.getItem("/products/tabs/faq/show").setVisible(false);
//IWDatacapture.getItem("/products/tabs/termsandconditions/show").setVisible(false);
//IWDatacapture.getItem("/products/tabs/promotions/show").setVisible(false);
]]>
</script>
...
<item name="show" pathid="show">
<label>Show tab
<checkbox>
<option value="1" label="yes" />
</checkbox>
</item>
I tried to swap the order (to check any typo error in the container name), I still found that only the 1st checkbox is being checked, the other 6 is uncheck.
can somebody guide me through this? Thanks