I have a form with two hidden subforms. Each subform contains a table with fields that need to be mandatory when visible.
The subforms are hidden or revealed based on a selection from a drop-down list.
I found the below script which works great for making a text field mandatory when visible, but, how do you apply this to cells in a table?
I can't figure it out.
if ("RMC-Fort Lupton-FIRE-DOT" == xfa.event.newText)
{
Table.FL.presence = "visible";
Table.FL.TextField1.mandatory ="error";
}
else
{
Table.FL.presence = "hidden";
Table.FL.TextField1.mandatory ="disabled";
}
if ("RMC-Ault-FIRE-DOT" == xfa.event.newText)
{
Table.ALT.presence = "visible";
Table.ALT.TextField2.mandatory ="error";
}
else
{
Table.ALT.presence = "hidden";
Table.ALT.TextField2.mandatory ="disabled";
}
Thanks in advance!