Thank you for your attempt but unfortunately this method doesn't work... if
the form is valid I simply see the form again...
Maybe I need something to capture the post request from the form and send it
to the pommo's page... but how?
Eugene Morgan wrote:
>
> If I understand correctly what you are trying to do, I think all you
> need to do is immediately after you instantiate the $newsletterForm,
> set its action to what you want (not after it's posted) ...
>
> i.e.,
> $newsletterForm = new Default_Model_NewsletterForm();
> $newsletterForm->setAction('/areaprivata/pommo/user/process.php');
>
> Does that help?
>
> On Wed, Jul 15, 2009 at 5:08 AM, nulele<[email protected]> wrote:
>>
>> hello nabble!!
>> I'm trying to integrate my zend application with pommo.
>> I don't want to replicate pommo's logic on new user subscription by
>> creating
>> zend_db objects for every pommo's table... I just want to:
>>
>> 1) create the subscription form with zend_form,
>> 2) validate the form on zend side
>> 3) submit the form to the pommo's page used to insert new user
>>
>> I've already completed the first 2 steps... here's the code in my
>> controller
>> to validate the form:
>>
>> public function newsletterAction()
>> {
>> $newsletterForm = new Default_Model_NewsletterForm();
>> $this->view->newsletterForm = $newsletterForm;
>>
>> if ($this->getRequest()->isPost())
>> {
>> $formData = $this->getRequest()->getPost();
>>
>> if ($newsletterForm->isValid($formData))
>> {
>>
>> $newsletterForm->setAction('/areaprivata/pommo/user/process.php');
>>
>> #### HERE GOES THE MISSING CODE #####
>>
>>
>>
>> }
>> else
>> {
>> $newsletterForm->populate($formData);
>> }
>> }
>> }
>>
>> If anyone has an idea, please let me know.
>> Many Thanks
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-force-zend-form-to-submit-to-new-action-tp24495073p24495073.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/how-to-force-zend-form-to-submit-to-new-action-tp24495073p24511659.html
Sent from the Zend Framework mailing list archive at Nabble.com.