How to use conditions to hide everyhing else and go on the submit button?