ZF-5404: Zend_Form removeElements for Zend_Form_Subform does not removes belongsTo relation on the element

Description

cf title. This makes the elements stills belonging to the subform. You can hack the elemnt with setBelongsTo() but trying to mave an hidden field from a subform to the main Form I cannot find a way to do it. The element is still displayed with the subform name, you cannot pass an empty value to setBelongsTo(). Maybe Zne_dForm_Subform should add some stuff on inherithed removesElement() function to clean this belongsTo data.

Comments

Yes that is true, but how would you differentiate if belongsTo was set directly on the Element instead of beeing set through $form->setElementsBelongTo when adding an Element to a SubForm.

Or is it that this value should be discarded in either cases?