[support] Form API help needed
bharani kumar
bharanikumariyerphp at gmail.com
Wed Oct 29 12:26:57 UTC 2008
function custom_submit($form_id, $form_values) {
print db_query("INSERT INTO {node_revisions} (title, body, teaser,
timestamp) VALUES ('%s', '%s', %s, '%d')", $form_values['first_name'],
$form_values['last_name'], $form_values['city']);
drupal_set_message(t('Your form has been saved.'));
}
How to supply values for form_id arugument ?
On Sat, Oct 25, 2008 at 4:30 AM, Jonathan Hedstrom <
jhedstrom at opensourcery.com> wrote:
>
>
> nebodysguess at gmail.com wrote:
> > Hi,
> >
> > I created a form module which is displayed as a block on the home page.
> > On submitting this form you get something like this :
> >
> > http://website_name.com/pages/?location=chicago°ree=MBBS ....... and
> > so on
> >
> > but I want the parameters to be sent to the results.tpl.php page
> >
> > I'm using 'get' method & $form_state['redirect'] = "?q=results". I'm
> > using Drupal 6.2
> >
> > What else should I do ?
> Try setting the #action to whatever path you need it to go to.
>
> $form['#action'] = url('foo/bar')
>
>
> http://api.drupal.org/api/file/developer/topics/forms_api_reference.html#action
>
> Cheers,
>
> Jonathan
>
> --
> Jonathan Hedstrom OpenSourcery
> http://opensourcery.com Technology for Good
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
--
உங்கள் நண்பன்
பரணி குமார்
Regards
B.S.Bharanikumar
POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20081029/0e429eeb/attachment-0001.htm
More information about the support
mailing list