I am getting instead of the value SMI need this to be hidden...any clues on this?Please see the attached code
<item name='site_nm' pathid='site_nm'> <hidden/> <select required="t"> <option label='Site Manager' value ='SM' selected='t' /> </select> </item>
My reading of the DTD says that the hidden element can only contain an optional allowed and/or callout element - and not a select element. So it's not working the way you have it doesn't surprise me too much.I'm not sure I understand the rationale behind this code though - you're setting up a single-item select list with a default value selected and you want the whole thing hidden - you could probably use several other mechanisms for acheiving the same thing (if I understand what you're doing correctly).However, you might try:<item name='site_nm' pathid='site_nm'> <hidden/> <select required="t"> <option label='Site Manager' value ='SM' selected='t' /> </select> </item>
Ghoti, I used ur answer, but I am not getting the default selected value<site_nm>SM</site_nm> its empty like this <site_nm/>I need to hide this from user and the xml should have the valueI tried this also...but it displays the dropdown on the formfunction initializeDCR(){ // Make Certain Fields hidden //setVisible()}function setVisible() { // Make Certain Fields ReadOnly //var setVisible = true; IWDatacapture.getItem("/document/site_nm").setVisable(false); } -------------------------------
<item name='site_nm' pathid='site_nm'> <hidden/> <text><default>SM</default></text></item>