-- 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

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to