autofill value based on cookie