Added expand and collapse code for optional form fields