Skip Navigation

[Résolu] Limiting checkbox selection not working when minified

This support ticket is created Il y a 5 années. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 réponses, has 2 voix.

Last updated by Tom Gonzales Il y a 5 années.

Assisted by: Christian Cox.

Auteur
Publications
#1231727

I am trying to: add a form to post to a custom post type, and in the form I want to limit the about of categories they can select within the form. I can get it to work when I unminify the page - hidden link

Link to a page where the issue can be seen: hidden link

I expected to see: only allow up to 3 checkboxes selected in the section titled Categories. When the page is minified, it doesn't work, but when I select to unminify the page, it does. Where is the JS I added to the form stored so maybe I can just remove that from being minified when the page loads?

Instead, I got: JS added to form to limit the number of categories checked doesn't work when page is minified.

#1231898

Hi, the JavaScript you add to a Form editor is actually injected into the page markup, so there's not a specific file you can exclude from minification. In general, we recommend you do not attempt to minify or obfuscate any Toolset code, as it could have unexpected results.

#1232963

Hi Chris - Since minifying CSS and JS files, I make it a point to check all pages to make sure things are still working properly, and this was the first instance of something not working the way it should. But the tool I'm using for minification (Hummingbird) allows me to unminify specific pages as needed using '?avoid-minify=true' at the end of the page URL. So I just set up a redirect to the original page URL with the added browser instructions and it's working fine now.

Thanks for your help!

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