Hi All,
I'm facing trouble in setting the checkbox value to checked on onreplicant add handler. Below is the snippet I'm using.
-----
IWEventRegistry.addItemHandler("/iw_config/reDevCont", "OnReplicantAdded",setDisplayFlag);
function setDisplayFlag(item){
var path = item.getName();
var path1=IWDatacapture.getItem(path+"/displayAmenityImageGroup_en-US");
var displayOptionsVal= IWDatacapture.getItem(path1).getOptions();
displayOptionsVal[0].selected = true;
}
<root-container name="iw_config" location="iw_config">
<container name="reDevCont" location="reDevCont" min="0" max="unbounded" default="0">
<item name="displayAmenityImageGroup" pathid="displayAmenityImageGroup" contentCategory="Marketing Copy" translatable="t">
<checkbox>
<option label="" value="0"/>
</checkbox>
</item>
</container>
</root-container>