updating logic to get input/textarea/select from required label