Forums

Forums / Bugs & Issues / After Upgrade to V6.1 - Form After Submission No Longer Rendering JS

After Upgrade to V6.1 - Form After Submission No Longer Rendering JS

4 posts, 0 answered
  1. Ray Arambula
    Ray Arambula avatar
    6 posts
    Registered:
    22 Mar 2018
    28 Mar 2023
    Link to this post
    Hello,

    We recently upgraded from V5.3 to V6.1.

    On many of our forms we have JS in the "After Submission" Form Setting.

    Prior to the upgrade we had code similar to this in the After Submission field:
    <a href="javascript: window.location.assign(<JS function>)"> Text </a>

    That link would render in V5.3 as
    <a href="javascript: window.location.assign(<a valid link here>)"> Text </a>


    Now that we've upgraded to V6.1, the JS is no longer rendering, what we get is this:
    <a>Text</a>

    Was there a change in V6.1 that no longer allows JS to be in the After Submission field?

    Is there a way for us to work around this?

    Thanks,
    Courtney
  2. Tom Pawelec
    Tom Pawelec avatar
    25 posts
    Registered:
    21 Oct 2022
    29 Mar 2023 in reply to Ray Arambula
    Link to this post
    Hi Ray,

    Sometimes upgrades may require you to refresh the widget by removing and replacing it with the same one. Alternatively you can always link JS from an external source.

    Regards,
    Tom
  3. Ray Arambula
    Ray Arambula avatar
    6 posts
    Registered:
    22 Mar 2018
    29 Mar 2023 in reply to Tom Pawelec
    Link to this post
    Hi Tom -

    To test this, I created a new form and put this in the "After Submission" box:


    <script>
    alert("it worked!");
    </script>

    <a href="javascript: window.location.assign(getLinkPath('/link.aspx'))"> Dynamic Link Path <i class="fa fa-long-arrow-right"></i> </a>
    <br />
    <a href="home.aspx"> Go Home <i class="fa fa-long-arrow-right"></i> </a>
    <br />


    This is what renders in V6.1

    <div data-tpc-role="success-message" class="alert alert-success" style="">

    <a> Dynamic Link Path <i class="fa fa-long-arrow-right"></i> </a>
    <br>
    <a href="home.aspx"> Go Home <i class="fa fa-long-arrow-right"></i> </a>
    <br>
    </div>


    It is as though the JS is being stripped out.

    We have JS working in that field when we're using V5.3.

    Is there another way to make JS work in that field?
  4. Tom Pawelec
    Tom Pawelec avatar
    25 posts
    Registered:
    21 Oct 2022
    04 Apr 2023 in reply to Ray Arambula
    Link to this post
    Hi Ray,

    This might work using the JavaScript widget. If you are still experiencing issues you can email support@crmportalconnector.com and open a case for a developer to investigate.

    Regards,
    Tom
4 posts, 0 answered