Conditional logic not working on form