Use reference to input to set value