form -> dispatch -> controller problem

70 views
Skip to first unread message

chem

unread,
Jul 21, 2011, 10:01:27 AM7/21/11
to Limonade
Hello,

given is a search form with

<form action="/chemdb-api/?/search" method="POST"> build by
<form action="<?php echo url_for('search');?>" method="POST">

and the input element
<input type="text" id="q" name="q" size="60">

The dispatcher:

dispatch_post('/search', 'search');

In the search Controller the input value is unknown. Where I am going
wrong?

chem




Lance Wicks

unread,
Jul 21, 2011, 10:25:56 AM7/21/11
to limo...@googlegroups.com
Hi Chem,

I might be wrong, but on first glance I think you want the PHP inside
the action element to be:

echo url_for('/search');

Others will no doubt comment also.

Lance

Reply all
Reply to author
Forward
0 new messages