How to show an email field conditionally and make it required