Skip Navigation

[Resolved] Console error in from builder on clicking ‘Conditional Output’ – not working

This thread is resolved. Here is a description of the problem and solution.

Problem:
The Conditional Output in CRED form builder doesn't work on all my sites I have checked by disabling all other plugins.

It shows the following error in console:

Uncaught TypeError: Cannot read property 'split' of undefined
at CodeMirror.splitLines (http://.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:8443:37)
at CodeMirror.Doc.splitLines (http://.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7619:14)
at CodeMirror.Doc.<anonymous> (http://.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7419:70)
at CodeMirror.Doc.replaceSelections (http://.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:3160:22)
at CodeMirror.Doc.replaceSelection (http://.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7413:12)
at CodeMirror.replaceSelection (http://.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7631:40)
at b.Button.qt_instance.theButtons.(anonymous function).callback (http://.../wp-content/plugins/cred-frontend-editor/library/toolset/toolset-common/utility/js/utils.js?ver=1.2.2:1602:44)
at HTMLDivElement.e (http://.../wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core…ts-scale,wp-pointer,quicktags,wplink,shortcode,plupload&ver=4.7.3:176:2488)

Solution:
Please use "Conditional Group" button under Add Generic Fields instead of Conditional output button, see screenshot here:

Conditional Group button

- Please follow this doc: https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/

Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/

This support ticket is created 7 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Valeriia 7 years, 7 months ago.

Assisted by: Noman.

Author
Posts
#508782

Hello,

The conditional output in form builder doesn't work on all my sites I checked (with other plugins disabled).

It creates the following error in console:

Uncaught TypeError: Cannot read property 'split' of undefined
at CodeMirror.splitLines (hidden link.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:8443:37)
at CodeMirror.Doc.splitLines (hidden link.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7619:14)
at CodeMirror.Doc.<anonymous> (hidden link.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7419:70)
at CodeMirror.Doc.replaceSelections (hidden link.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:3160:22)
at CodeMirror.Doc.replaceSelection (hidden link.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7413:12)
at CodeMirror.replaceSelection (hidden link.../wp-content/plugins/cred-frontend-editor/library/tool…common/visual-editor/res/js/codemirror/lib/codemirror.js?ver=5.5.0:7631:40)
at b.Button.qt_instance.theButtons.(anonymous function).callback (hidden link.../wp-content/plugins/cred-frontend-editor/library/toolset/toolset-common/utility/js/utils.js?ver=1.2.2:1602:44)
at HTMLDivElement.e (hidden link.../wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core…ts-scale,wp-pointer,quicktags,wplink,shortcode,plupload&ver=4.7.3:176:2488)

Thanks.

#508906

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Valeriia,

Thank you for getting in touch with us.

1. Can you please provide step by step details that how you have setup the CRED form? (preferably with back-end screenshots)

2. What you expected to see on the front page?
3. What you actually see right now (preferably with front-end screenshot or Link)

Can you please share your Debug Information with us so we can see it? I have enabled debug info box for your next reply:
https://toolset.com/faq/provide-debug-information-faster-support/

Looking forward to help you.
Thank you

#509304
s2017-04-04 (2).png
s2017-04-04 (1).png
screencapture.png

Hi Noman,

I'm talking about the form builder itself (back-end), regardless of what I expect to see on the front-end.

I'm attaching the screenshots, it will help you to understand.

I'm not sure how to provide you with the debug information from backend. I'm attaching the screenshot of the plugins I have installed. Regardless of them, the issue persists throughout all my sites.

To see the error, you actually need to click on "Conditional output".

Thanks.

#509330

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

conditional group.png

Hello Valeriia,

Please use Conditional Group (see attached screenshot) instead of Conditional output button.
Please follow this doc: https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/

Thank you

#509574
screencapture-demo.png

I see. I remember now, I was using it before. Somehow confused, and the UI is not helping.

Thank you.

By the way, since we are talking about the UI, the way the Access Control for CRED forms is organized is only suitable for small number of forms and user roles. I'm giving you a screenshot to illustrate what I'm dealing with on many projects. It's a zoomed-out (80%) screenshot of the whole screen, so in reality I see only 7 roles and 6 forms at once. So every time I need to set up the access, it converts into a quest.

If you guys can do something about it, that would really simplify my life (and not only mine I guess).

Thank you.