Zend Framework

Javascript issue with Hidden Element while using Zend Checkbox

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.0
  • Fix Version/s: None
  • Component/s: Zend_View
  • Labels:
    None

Description

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.

Issue Links

Activity

Hide
Nick Routsong added a comment -

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

Show
Nick Routsong added a comment - This was supposedly fixed in 1.5, but the error continues... please fix!!
Hide
Dolf Schimmel (Freeaqingme) added a comment - - edited
Show
Dolf Schimmel (Freeaqingme) added a comment - - edited It was fixed with r7646: http://framework.zend.com/code/changelog/Zend_Framework?cs=7972 .
Hide
Andrei Iarus added a comment -

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

Show
Andrei Iarus added a comment - It seems that in version 1.10.1-1.10.3 the problem still exists. This behavior probably is not W3 compliant.
Hide
Marc Hodgins added a comment -

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.

Show
Marc Hodgins added a comment - 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.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: