ZF-7793: An element with the same name as its subform handles the input value incorrect
Take a look at the following code. It appears that elements that have the same name as the subform that is containing them, don't handle the input value correctly. In fact, the input value always seems to get truncated to the first char of the input string.
<?php $form = new Zend_Form(); // Create a subform $subform = new Zend_Form_SubForm(); // Add an element with a validator to that subform $font = new Zend_Form_Element_Text('font'); $font->addValidator( new Zend_Validate_StringLength(3)); $subform->addElement($font); // Now add the subform to the central form and give it the same name as the previous element $form->addSubForm( $subform, 'font' ); // Provide some valid input $form->isValid( array( 'font' => array( 'font' => 'a valid input string' ) ) ); // Output equals stringLengthTooShort echo current($subform->font->getErrors()); // Output equals: t // in fact, all input will be truncated to a lenght of 1 char echo $subform->font->getValue(); ?>