Thanks Victor.
I understood that you suggested me to use hidden field to properly identify which form is been posted. Yes I solved my problem with hidden field an hour ago. However I just wanted to know if there is any helper or controller action command that gets the posting form name. If learn that, I'm about to make my scripts much smarter and reliable ^o^


Thanks a lot ;-)
-Enkhbilguun Erdenetsogt



On 10.01.05 20:01, Victor Farazdagi wrote:
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


<<attachment: enkhbilguun.vcf>>

Reply via email to