How to put a condition to Submit button?