Add setValue function to set a value of an input field