Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Conditional Field and Pop Up

Avatar

Level 2

I have a field that is mandatory if another field has a value.

if (!(this.isNull || this.rawValue == ""))

{

Population.mandatory="error";

}

else

{

Population.mandatory="disabled";

}

How do i script the Popluation field to show a message if the user doesn't provide a value when the field is mandatory?

2 Replies

Avatar

Level 10

Hi,

That code should do it, is it in the exit event of the controlling field?  You might need to check the options under Form Properties ... Form Validations, you should have "Show Dialog Message" set.  Also you might need to set the mandatory message value, so;

if (!(this.isNull || this.rawValue == ""))

{

    Population.mandatory="error";

    Population.mandatoryMessage="Please enter the population";

}

else

{

    Population.mandatory="disabled";

}

Regards

Bruce

Avatar

Level 2

Thank you.

Re: Conditional Field and Pop Up

created by BR001<http://forums.adobe.com/people/BR001> in LiveCycle Designer - View the full discussion<http://forums.adobe.com/message/5845243#5845243