Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Conner 18 posts 130 karma points
    Jul 01, 2020 @ 13:13
    Daniel Conner
    0

    Conditional Logic in umbraco forms 8.4.1

    Hi,

    I have an umbraco 8.6.0 instance with umbraco forms 8.4.1 and I cannot get the conditional logic to work.

    I have question A, which is a dropdown with options 1, 2, 3, and 4. In question B, short text field and the condition if question A answer is 4 then show question B.

    But this is not working, I know there has been a lot of issues with this in the past does anyone have a work around for this?

    Thanks in advance.

  • Daniel Conner 18 posts 130 karma points
    Jul 01, 2020 @ 13:34
    Daniel Conner
    0

    Bit of further information I am getting the follwoing console error:

    Uncaught SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at initCollection (umbracoforms.js:25)
    at listen (umbracoforms.js:17)
    at umbracoforms.js:5
    at umbracoforms.js:451
    
  • Tim Geyssens 6526 posts 15308 karma points MVP 2x c-trib
    Jul 01, 2020 @ 13:41
    Tim Geyssens
    101

    Best add this to: https://github.com/umbraco/Umbraco.Forms.Issues/issues don't think HQ is monitoring this forum...

  • Daniel Conner 18 posts 130 karma points
    Jul 01, 2020 @ 13:49
    Daniel Conner
    2

    Thank you, will do this just now, managed to find a solution:

    Found that line 25 in App_Plugins\UmbracoForms\Assets\themes\default\umbracoforms.js has been updated to: init({ form: JSON.parse(unescape(formsCollection[i]))});

    changed back to init({ form: formsCollection[i]});

    and the conditions worked as expected, just in case anyone comes here with the same issue.

  • Blake Clerke 104 posts 347 karma points
    Jul 23, 2020 @ 18:57
    Blake Clerke
    0

    Thank you for sharing the fix Daniel Conner!! I am running into this issue too & this fixed it for me. Did you post this on the issue tracker too? I will definitely follow for a fix in an upgrade. Appreciate it! :)

  • Heather Floyd 528 posts 772 karma points MVP 2x c-trib
    26 days ago
    Heather Floyd
    0

    FYI - Here is the related issue: https://github.com/umbraco/Umbraco.Forms.Issues/issues/273

    Looks like it might be fixed now?

Please Sign in or register to post replies

Write your reply to:

Draft