Why is the condition not being recognized on my form?