Skip Navigation

[Resolved] Inline jQuery with escaped characters breaks after exporting and importing

This support ticket is created 4 years, 1 month 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1548513

I am trying to:

Export a cred form with the following inline jQuery

jQuery( "input[name=participants\\[\\]]" ).each(function() { ...

and import this cred form into another site.

On the target site, this results in this inline code:

jQuery( "input[name=participants\[\]]" ).each(function() { ...

causing the brackets to not be escaped properly anymore and this breaks the jQuery.

#1549417

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I think you are using the wrong syntax as rather adding the slash to escape the brackets, you should try to use the following method.

As you can see - I've removed the slashes and wrapped the field name in single quotes: 'participants[]'
For example:

jQuery( "input[name='participants[]']" ).each(function() {

And then save your form, export it and later try to import it. It should work. 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.