toggle input and view