How to show/hide submit button based on a condition.