unified form handling