How do I check if an input field is visible?

How do I check if an input field is visible?

Hi,

I'm trying to using Deluge script to evaluate whether a field is visible or not, but not sure of the syntax. Is it something like input.Field.visible = true?

I basically want to write, "If field_x is visible, do this; if field_x is invisible, do this."

Any help is appreciated.
Thanks.