handle form element in one place.