How to hide fields based on dropdown value?

I have different kind of field I would like to hide based on a dropdown selection. There is one image : “Image1”; two buttons : “Button1” and “Button2”; ont text field : “Text8”; two checkboxes on the same name : “CB1”. There is three option in the dropdown : 1, 2, 3. I would like to know what is the code to make all the field dissapear if 3 is selected.

I have this code :

if(event.value == "3"){
this.getField("Image1").display = display.hidden;
this.getField("Button1").display = display.hidden;
this.getField("Button2").display = display.hidden;
this.getField("CB1").display = display.hidden;}

However, it doesn’t work for images and checkboxes. Is there a special code for those.

Thank you.