Hide Fields upon selection of drop down
Hello,
Need some help...I need to be able to hide several user input fields and some text fields when an option is selected from a drop down.
A few of the Fields to hide are
this.getField("CY CU").value // user entered field
this.getField("CY Plus CPI").value // user entered field
this.getField ("RY CU").value // user entered field
this.getField ("Expense type") // pre-filled text field that is read only is this still a .value
I tried the below as a validation on each of the user entered fields , but the problem was it didn't hide until user entered data. I don't want the user to enter data at all.
var drop = this.getField("Contract type").valueAsString;
if(drop == "2") event.target.display = display.visible;
else if (drop == "4") event.target.display = display.hidden;So now, I'm wonder if I need to put the validation text on the drop down field, I'm assuming it will hide the field when the option is selected. But I'm not sure how I make the event.target all of those different fields if I put it there.
Any guidance would be helpful as I haven't found the other posts to be helpful.
Clueless beginner
