Condition on radio-button choice field
Posted: 11 May 2017
Hi, i am trying to set up a condition for the following scenario:
There is a choice field with radio buttons option, set up clear by default, if the user does not choose any of the options certain field become available and mandatory. If the user chooses anything - fields become hidden. I am struggling with setting that initial if for the field, i tried:
if (fd.field('fieldname').value(null)
if (fd.field('fieldname').value()
if (fd.field('fieldname').value()==null
I kinda made a workaround for showing/hiding using: (fd.field('fieldname').value()==0 || fd.field('fieldname').value()==1) - but it doesn't work on Display form or for mandatory field condition (as it has nested structure and based on several fields).
Could you please help me to specify it?
There is a choice field with radio buttons option, set up clear by default, if the user does not choose any of the options certain field become available and mandatory. If the user chooses anything - fields become hidden. I am struggling with setting that initial if for the field, i tried:
if (fd.field('fieldname').value(null)
if (fd.field('fieldname').value()
if (fd.field('fieldname').value()==null
I kinda made a workaround for showing/hiding using: (fd.field('fieldname').value()==0 || fd.field('fieldname').value()==1) - but it doesn't work on Display form or for mandatory field condition (as it has nested structure and based on several fields).
Could you please help me to specify it?