ZF-3272: Zend form produces empty
element that is problematic to correct with css

Issue Type: Bug Created: 2008-05-16T04:48:52.000+0000 Last Updated: 2008-07-24T09:26:18.000+0000 Status: Resolved Fix version(s): - 1.5.3 (28/Jul/08)

Reporter: Marcin Lulek (ergo14) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:


There is a problem with zend form and subforms, the subform markup is made of

< fieldset>......... , this causes problems when we have many subforms in a form , for example i had 7 of them that i wanted to show hide with JS, and i ended up with lots of empty spaces in the form that i could not correct any way with css. Maybe the empty element should not be created when we add subform to our main form ?


Posted by Matthew Weier O'Phinney (matthew) on 2008-05-16T11:54:46.000+0000

Need some reproduce code before I can proceed.

Posted by Matthew Weier O'Phinney (matthew) on 2008-05-16T11:57:53.000+0000

Reproduce code:

<pre class="highlight">
$subForm = new Zend_Form_SubForm(array(
    'elements' => array(
        'foo' => 'text', 
        'bar' => 'text',
$form = new Zend_Form(); 
$form->addSubForm($subForm, 'foobar')
     ->setView(new Zend_View); 
echo $form;

Posted by Matthew Weier O'Phinney (matthew) on 2008-07-24T09:26:18.000+0000

Test added to ensure that subform

has no-break space. While we understand the issues presented, we do not plan to support the request as there are existing options to address it.

  • The user can remove the DtDdWrapper decorator and instead use the HtmlTag wrapper to add a sole tag.
  • CSS selectors can be used effectively to change the display settings
  • JS libraries can be used to locate and decorate the appropriate DOM elements

Have you found an issue?

See the Overview section for more details.


© 2006-2022 by Zend by Perforce. Made with by awesome contributors.

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