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

If statements to make fields visible or hidden

Avatar

Level 2

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