Hi,
Are you looking for something along the following lines:
$request = $this->getRequest();
$post = $request->getPost();
if(isset($post['formId']) === false || $post['formId'] !=
'surveygetform') {
$this->view->surveyForm = $form;
return; // no need to process some other form was submitted
}
Basically, in your controller action which process form, you check the
ID, so you know which form has been submitted.
Hope this helps,
Victor
Enkhbilguun Erdenetsogt wrote:
Hello,
Could you help me to retrieve getting form tag attribute id value?
I have two forms in each of pages. One of them is called from a
different controller via $this->action('action', 'controller'); as a
sidebar survey form.
When I click any form's submit button the survey form, located at
sidebar, returning error of specific fields are empty. Of course there
can't be any survey answers, since the posting form is not the survey
form.
I think that's because I didn't write a function checks if the poster
is survey form. So I assigned form name (actually ID attribute) for
the survey form. Now I really can't solve my issue since I don't know
how to retrieve the form id attribute.
Do you know how?
<form id="surveygetform">
Sincerely,
Enkhbilguun Erdenetsogt