set value to input field if option previously selected