Refactor field highlighting javascript in add form.