Add ternary operator to submit button in forms for create and update