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)
DCT hidden field validation
rodigz
Hi ,
We are using TS 6.5 , I encounter problem on form api validation on the hidden field. Basically it should not validate. This codes wroks fine in 5.5.2
dct
<label>Test</label>
<radio required="t">
<allowed>
<not>
<cred role="author"/>
</not>
</allowed>
<option value="Y" label="Yes"/>
<option selected="t" value="N" label="No"/>
</radio>
<hidden/>
</item>
formapi
uisng the
if ( ! iwItems.isValid() ) {
// alert("not valid");
var iwItemValue = iwItems.getValue();
if ( Object.isEmpty(iwItemValue) ) {
alert ("Error")
} else {
alert("default error") ;
}
object will check if is null.
thanks.
Find more posts tagged with
Comments
jbonifaci
Why don't you just use .getType() and check if it is radio or hidden?
~Jeff
rodigz
i've just used formapi to hide fields for certain role. it works fine now.
var role =IWDatacapture.getRole();
if (role == "author")
{
var newitem=IWDatacapture.getItem('Test');
newitem.setVisible(false);
IWDatacapture.redraw();
}