Skip Navigation

[Resuelto] Limiting checkbox selection not working when minified

This support ticket is created hace 5 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Tom Gonzales hace 5 años, 7 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#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 - enlace oculto

Link to a page where the issue can be seen: enlace oculto

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!