basic form open/close functionality