add handlers to input elements as they are created