Enhanced to preserve input's id when textbox is constructed