Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

{Portal} How to display static html content in web form steps

Posted on by 55,410

I have configured a web form with multiple steps. After certain steps, I need to display some text (general guidelines) along with the field data captured in the previous steps. Basically a summary page along with some additional instruction and external  links.

As we do not have access to web templates for web form steps, what would be the best way to achieve this?

*This post is locked for comments

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: {Portal} How to display static html content in web form steps

    Thanks Aric.

    I was looking for this only (custom web template for web form). I will give it a try.

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: {Portal} How to display static html content in web form steps

    HI Ravi,

    We have a Web Page, which contains a Web Form.

    The Web Page references a Page Template and that references a custom developed Web Template.

    The Web Template contains the liquid code that validates the step id.

    If the step Id is not empty, it displays one thing (as previously shown in liquid code). If it is, it will display another thing.

    You can add further code to actually check the step id value so that it shows only on the particular page that you want.

    I hope this clarifies it.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: {Portal} How to display static html content in web form steps

    Thanks Aric. So you used custom web template and not the out of box "web form" page template? IOut of box "Web Form" template is using redirect page to "~/Pages/WebForm.aspx"

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: {Portal} How to display static html content in web form steps

    Hi Ravi,

    I am not sure that the way we implemented this is the best way, but it is working for us.

    On the last page of the web form, you actually add the controls that you need to gather information from, and using jquery on the jquery.

    Inside the Web Template that we created that is being used by our process we added the following logic (example)

                    {% assign stepId = request.params['stepid'] %}
                    {% if stepId %}
                    {% assign webFormStep = entities.adx_webformstep.[stepId] %}
                        <h2 class="section-title mar-b20">{{ webFormStep.adx_name }}</h2>
                        <p class="mar-b30">{{ webFormStep.adx_instructions.value }}</p>
                    {% else %}
                        <h2 class="section-title mar-b20">Default section header</h2>
                        <p class="mar-b30">Default section title</p>
                    {% endif %} 

    Hope this helps.

  • Suggested answer
    sandeepstw Profile Picture
    sandeepstw 4,601 on at
    RE: {Portal} How to display static html content in web form steps

    Hi Ravi,

    You can create sections in form for multiple steps and add HTML web resource in form session where ever you need.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: {Portal} How to display static html content in web form steps

    Hi Aric,

    Which template you use for manipulating the steps? Could you please share some more details?

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: {Portal} How to display static html content in web form steps

    Hi Ravi,

    What we have usually done in this kind of scenarios is display the fields from the previous steps as hidden (using jquery), and then use jquery to manipulate the data and display the text on the form as needed.

    We add placeholders for text inside the Web Template, so that it is easily accessible.

    Hope this helps.

  • Verified answer
    Rizwan Aarif Profile Picture
    Rizwan Aarif 480 on at
    RE: {Portal} How to display static html content in web form steps

    Hi Ravi,

    You could add a custom web resource and add it to a Tab/Section in CRM Entity form. It'll render in portals in that particular web form step (as per your choice). You can also use conditionaly on/off.. show/hide using Jquery then.

    Let me know if this helps.

  • RE: {Portal} How to display static html content in web form steps

    Not sure if this is the answer but, you could look into the event handlers on the fields of the form when specific fields change you could execute some code or script. You could create the static html as a web resource and load/run it when u need it.  Personally haven't worked with forms with multiple steps yet so i can't say if it would work.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: {Portal} How to display static html content in web form steps

    *bump*

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans