Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

If statements to make fields visible or hidden

Avatar

Former Community Member

Based on how the user answers a question being asked in "this.rawValue" field, I want other fields to become visible.  I have this code and it worked until I added the last reference.  If the users answers "Rating" I need three fields to become visible otherwise hidden and I don't know how to state it properly.

if(this.rawValue=="RefExempt")

NPV.presence="visible"

else

NPV.presence="hidden"

if(this.rawValue=="DExempt")

Discount.presence="visible"

else

Discount.presence="hidden"

if(this.rawValue=="Rating")

Rated.presence="visible"

NotRated.presence="visible"

InvestCert.presence="visible"

else

Rated.presence="hidden"

NotRated.presence="hidden"

InvestCert.presence="hidden";

0 Replies