added possibility to set viewType of the form