November Happy Hour will be moved to Thursday December 5th.

Cannot Access Forms using GetFormsInfo

Vote:
 

I have a page that I navigate to after a form submission that i want to display information about the submitted form. I am able to access the data using _formDataRepository.GetSubmissionData. However, I cannot access the actual FORM itself, it just returns an empty list when calling _formRepository.Service.GetFormsInfo(null); Below is my current code:

public class Controller: PageController<PageData>
{

private Injected<IFormRepository> _formRepository;

public ActionResult Index(CompletePage currentPage)
{

var info = _formRepository.Service.GetFormsInfo(null);

}

Info always returns no results

#200737
Edited, Jan 24, 2019 1:36
Vote:
 

Hi Travis,

_formRepository.Service.GetFormsInfo(language) returns basic information of forms existing in the system.

To get the form container block instance you can use: 

var formContainerBlock = EPiServer.AddOns.Helpers.ContentExtensions.GetContent(yourFormIdentity.Guid, yourFormIdentity.Language) as FormContainerBlock;
#200739
Jan 24, 2019 2:23
Vote:
 

That looks like exactly what I need. Thanks!

#200787
Jan 24, 2019 18:50
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.