Why don't the form's conditions work properly?