Is it possible to hide some form elements when calling via view action?

I would like to somehow detect that form was loaded by using view action and modity the form layout slightly.
Was this page helpful?