• Resolved insitelabs

    (@insitelabs)


    Good day,

    I hope you can assist me. I’ve been having some trouble getting this plugin to work for me for some time now. I’ve worked around this issue, setting aside some time every now and then to try and resolve the issue I am having all the while working on getting the rest of the site sorted.

    However now that I am finish with only this one issue remaining and still no solution in sight. I have finally decided to post here in the hopes that you can assist me.

    The issue I’m having is quite simple, when I select a group from the radio buttons there is no drop-down showing the additional fields.

    The cause from what I have been able to find is incompatibility between this plugin and WP Bakery (JS Composer).

    The evidence behind my suspected cause is due to the two plugins by themselves showing no errors in the console and the additional fields working. However as soon as I enable both, I get the following error in the console with the fields no longer showing depending on the selection:

    SyntaxError: JSON.parse: end of data while reading object contents at line 1 column 2 of the JSON datascripts_es6.js:37:28
    Wpcf7cfForm scripts_es6.js:37
    js scripts_es6.js:1004
    jQuery 2
    each
    each
    js scripts_es6.js:1003
    Webpack 3
    __webpack_require__
    <anonymous>
    <anonymous>

    The lines referenced are as follows:
    37) var form_options = JSON.parse(options_element.val()); found in webpack:///js/scripts_es6.js

    1004) wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this))); found in webpack:///js/scripts_es6.js

    1st each) references jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license | WordPress 2019-05-16 found in wp-includes/js/jquery/jquery.js

    2nd each) Same as the first.

    1003) jQuery(‘.wpcf7-form’).each(function(){ webpack:///js/scripts_es6.js

    __webpack_require__) line 19: modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); found in webpack:///webpack/bootstrap

    1st <anonymous>) line 83: return __webpack_require__(__webpack_require__.s = “./js/scripts_es6.js”); found in webpack:///webpack/bootstrap

    2nd <anonymous>) line 87: /******/ ({ found in webpack:///webpack/bootstrap

    Other useful information:
    Both the WordPress version and all the plugins and theme files are up-to-date.
    I did deactivate all plugins already and removed all additional code in the functions.php file.

    I hope this information helps. Please do let me know if I can assist in any other way and thank you for your time.

    Kind Regards,

Viewing 1 replies (of 1 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Thanks for this detailed report.
    I don’t believe there is a problem with the following configuration out of the box:

    – Theme:
    —- Twentytwenty
    – Plugins:
    —- Contact Form 7
    —- Conditional Fields for Contact Form 7
    —- WP Bakery

    Could you please set up a website with this configuration, and create a simple contact form that illustrates the problem? If you have done this, please past the form code and conditions here, so I can reproduce your exact problem. Thanks.

    • This reply was modified 6 years, 2 months ago by Jules Colle.
Viewing 1 replies (of 1 total)

The topic ‘WP Bakery & CF7 – Conditional Fields produce JSON.parse error’ is closed to new replies.