I've built a FormContainerWithNavigationBlock that is meant to wrap the original FormContainerBlock. I've got it wired up and it's mostly working, however when I call the original FormContainerBlock.ascx, it's returning an "Object reference not set to an instance of an object" exception. Is this the correct path to the original FormContainerBlock view?
if (Model != null && Model.ElementsArea.Items.Any())
var formStepItems = Model.ElementsArea.Items.Where(x => x.GetContent() is FormStepBlock);
@foreach (var step in formStepItems)
var thisStep = step.GetContent() as FormStepBlock;
Moving my view to ~/views/Shared/ElementBlocks/ as specificed in ~/modules/_protected/EPiserver.Forms/forms.config resolved my issue.
Hey, I answered here, but essentially, if you just want to change rendering of FormsContainerBlock, it's way easier to just override the view by copying it to Views/Shared/ElementBlocks.