extract form handling from general route