Use a ternary for submit rewquired.