Set null to all fields in the form

Set null to all fields in the form

Hi,

I am trying to write a script on user input of a specific field so when user select the null (something like -Select-- ) then the rest of the fields will automatically set null values. I can try by below code but since there are lots of field so I am looking for short way to do that so I don't have to write all fields individually. Can anybody please help me .

Code :

if (input.Update_TVStation  =  null)
{
  input.field01 = null;

    input.field02 = null;

 input.field03= null;

 input.field04 = null;

 input.field05 = null;
......
.....

}