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@opensourcery.com> wrote:
nebodysguess@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%C2%B0ree=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#act...
Cheers,
Jonathan
-- Jonathan Hedstrom OpenSourcery http://opensourcery.com Technology for Good
-- [ Drupal support list | http://lists.drupal.org/ ]