Set previous value for inputs in search form, to prevent submitting form if value is not changed