That's what I assumed, that the URL would be dynamic (and non-standard) in some way. I don't think it's a good idea to let a form's action be determined by javascript. It's not unobtrusive and will cause problems with browsers that do not have javascript enabled. If you just want to redirect the user after the form has been submitted, why not write a very simple controller action and do a _redirect() there? Just a simple post/redirect/get pattern.

have a look at:
http://www.theserverside.com/patterns/thread.tss?thread_id=20936

MF

Matthew Weier O'Phinney wrote:
-- Maurice Fonk <[EMAIL PROTECTED]> wrote
(on Wednesday, 16 May 2007, 10:48 PM +0200):
You could write a view helper that can generate urls? That's what I would do. But it depends a lot on your application's layout and front controller.

There's already a view helper for this -- Zend_View_Helper_Url.

Try this:

    <form action="<?= $this->url(array('controller' => 'name')) ?>" 
method="post">
        Name: <?= $this->formText('name') ?>
    </form>

I'm not sure if the OP wanted to have the action dynamically determined
based on the input -- it looks like he may want the value of the 'name'
field appended to the url on submission. If this is the case, he'll need
to do some javascript magic to do so.

Stuardo -StR- Rodríguez wrote:
how sould we write a form so it can do something like this:


<form method="??">
        Name: <input name="name">
</form>


it should  redirect the target to   index.php/name/$name



--
Maurice Fonk

[EMAIL PROTECTED]
http://naneau.nl/

Scio me nihil scire

Reply via email to