Conditions not working properly on the form embedded