CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 163 forks source link

BUG: When using conditional logic /* and /*]]>*/ added around field #2813

Closed webharvest closed 5 years ago

webharvest commented 5 years ago

Do You Need Immediate Help? YES

Is This A Feature Request? NO

What Version Of Caldera Forms, WordPress and PHP Are You Using?

WordPress Version: 4.9.8 PHP Version: 7.0.32 MySQL Version: 5.6.34

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

I believe so but I can't test that right now.

What Is The Unexpected Behaviour?

I am using conditional logic in two areas of a form. I’ve noticed lately that characters are being added around fields that use conditional logic. When the field using logic are displayed the following is displayed. The “Field using Conditional Logic” test below is the meant to represent the actual field. / “Field using Conditional Logic” /]]>*/

I noticed that if I don't set a default value in the field that controls the conditional logic so the field using the conditional logic is displayed when the page first loads; the characters are not displayed. If I set the value so the field using the conditional logic is hidden and then set it so it is displayed the characters appear.

You can see this error in the link below: https://www.e3financialcoaching.com/meet-the-coaches/contact-us/ Just toggle the Would you like us to call you? field.

Shelob9 commented 5 years ago

I am closing this out as it is not an issue that is present with the default theme and no other plugins active.

This is almost always caused by a caching plugin (w3tc always does this) that can not handle HTML script tags, which our conditional logic is based on. Other times its a theme or page builder parsing shortcodes wrong.

If you need help debugging this on your site, please use https://calderaforms.com/support