ZF-7847: Javascript issue with Hidden Element while using Zend Checkbox

Issue Type: Improvement Created: 2009-09-15T02:59:16.000+0000 Last Updated: 2012-05-09T17:26:39.000+0000 Status: Closed Fix version(s): Reporter: Logamurugan Pilavadi (logamurugan) Assignee: Frank Brückner (frosch) Tags: - Zend_View

Related issues: - ZF-6624



While creating the CheckBox element using zend form, it is generating the hidden element which is causing the java script validation problem.

Ex: If you say like "document.form.mycheckbox.checked" the script will fail because in the same name we have a hidden element. It would be better if we have any flag for not generating hidden element. By that way we can avoid JavaScript related issues.

Expecting the solution from your side.

FYI: By now in our library, to overcome that problem we have commented hidden generation part. But it is not the right solution.


Posted by Nick Routsong (nickrouty) on 2009-10-19T15:42:23.000+0000

This was supposedly fixed in 1.5, but the error continues... please fix!!

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-10-19T15:48:13.000+0000

It was fixed with r7646:… .

Posted by Andrei Iarus (poni1111) on 2010-04-14T07:27:35.000+0000

It seems that in version 1.10.1-1.10.3 the problem still exists. This behavior probably is not W3 compliant.

Posted by Marc Hodgins (mjh_ca) on 2010-11-28T19:01:51.000+0000

The simple workaround here is to set the checkbox 'id' attribute. This allows you to access the checkbox from javascript with document.getElementById() because the hidden element does not get the ID set.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.