add generic form handler