save state of the select field