Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Conditional Field and Pop Up

Avatar

Former Community Member

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

Former Community Member

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