Conditions not working in an embedded form