How do I programmatically get a list of all Episerver forms that are submitted

private Injected<IFormRepository> _formRepository;
private Injected<IFormDataRepository> _formDataRepository;
var formsInfo = _formRepository.Service.GetFormsInfo(null); 
// take all forms in all languages
// Get basic information of forms existing in the system.
// We ONLY find form in the root folder which designed for holding EPiServer forms.
foreach (var info in formsInfo){ _formDataRepository.GetSubmissionDataCount(new (FormIdentity(info.FormGuid)), DateTime beginDate, DateTime endDate, true)
  • beginDate can be something from 1st/Jan/2000
  • endDate can be DateTime.Now
  • true is only take finalized record count