improved form content generator to allow custom content types