if targetElement is select element widget is created based on it