to know status of field (hidden or shown)

to know status of field (hidden or shown)

 i have 10 fields which are hidden at the LOAD of form,

and depending to the select of user can be shown.

i need to know status of fields at the submit action.

it's like

if ( field1.status("hidden") )

{ do something; }

else if ( field1.status("show") )

{ do anotherthing; }


how can i do it.

which command is it?