2

I've asked this several months ago when 9.1 was transitioning to 9.2

Now with 9.3 is multi-step chunking with conditional form logic and progress feasible this time around?

https://xd.adobe.com/view/8be4c4f1-ce01-4f3a-4bea-577b38bd4a66-fdd5 Here's a wireframe for more context. Click on the canvas to move to the next screen.

Form extensions could potentially do the job. However looking at OOB solution only at this stage

Example Form

0

2 Answers 2

1

No, this is not possible OOTB at the moment (Sitecore 9.3 Initial Release). The conditions currently only look at the page the form elements are on.

This means that if I select Option A in page 1, I can't see that (OOTB) in Page 2.

2
  • Cheers for confirming Trayek. Our Sitecore rep said this would happen in 9.3 Could this be done using form extensions or only the custom route?
    – detonate
    Commented Mar 11, 2020 at 5:35
  • I'm not certain Forms Extensions can handle this - I've only quickly went through github.com/bartverdonck/Sitecore-Forms-Extensions though, I haven't used it myself.
    – Trayek
    Commented Mar 11, 2020 at 12:49
0

Had the same issue for the progression bar with multiple steps Forms in Sitecore 9.3.

I ended up adding the whole progression bar html on each pages(forms chunk) using the OOTB Text Field with an extra CssClass that will be used within the view (here I am using "rawHtml". Then overwrite the TextField view (C:\inetpub\wwwroot\yourInstance\Views\FormBuilder\FieldTemplates\Text.cshtml) with this :

@model Sitecore.ExperienceForms.Mvc.Models.Fields.TextViewModel

@if (Model.CssClass.Contains("rawHtml"))
{
    @Html.Raw(Model.Text)
}
else
{
    <div class="parametric-richtext-container ">
        <@Model.HtmlTag data-sc-field-key="@Model.ConditionSettings.FieldKey" class="@Model.CssClass">@Model.Text</@Model.HtmlTag>
    </div>
}

Your html chunk should have a currentClass, completedClass, etc and assign those on each chunk accordingly. Ex :

For chunk 1,

<div class="form-steps">
    <p class="form-step is-current">
        <span>Step 1</span>
    </p>
    <p class="form-step">
        <span>Step 2</span>
    </p>
    <p class="form-step">
        <span>Step 3</span>
    </p>
</div>

For chunk 2,

<div class="form-steps">
    <p class="form-step is-completed">
        <span>Step 1</span>
    </p>
    <p class="form-step is-current">
        <span>Step 2</span>
    </p>
    <p class="form-step">
        <span>Step 3</span>
    </p>
</div>

For chunk 3,

<div class="form-steps">
    <p class="form-step is-completed">
        <span>Step 1</span>
    </p>
    <p class="form-step is-completed">
        <span>Step 2</span>
    </p>
    <p class="form-step is-current">
        <span>Step 3</span>
    </p>
</div>

For chunk 4 or thank you message or whatever,

<div class="form-steps">
    <p class="form-step is-completed">
        <span>Step 1</span>
    </p>
    <p class="form-step is-completed">
        <span>Step 2</span>
    </p>
    <p class="form-step is-completed">
        <span>Step 3</span>
    </p>
</div>

With the pages(forms chunk) being hidden/show within the previous/next navigation, it worked out pretty well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.