Conditional Logic: conditions not working in the form