move repetitious form handling code to BaseFormHandler