updated select form to handle multiple elements