I have edit form for entity. There is element
$feedback = new FeedbackViewer('Feedback');
$feedback->setLabel('Feedback')->setRequired(false);
$feedback->setPostId($this->testimonialId);
$feedback->setAppId($this->config->testimonials->appId);
$feedback->setIgnore(true);
$this->addElement($feedback);
This feedback viewer loads iframe with another zf datagrid that shows feedbacks inside the form.
I use this form in ZF datagrid
$entityId = $this->getRequest()->getParam('edit');
if ($entityId) {
$entityForm = call_user_func($formCallback, $entityId);
$form->setUsePreDefinedFormElements(true);
$form->setForm($entityForm);
}
But ZF datagrid after saving action triggers error Validation failed. Removing the feedbacks element makes it saving correctly.
any suggestions?
I solved this issue with putting this in If tags, couldn’t find better solution.