I'm trying to send a simple costume for un Drupal 7, but I cannot get it to get the variables, It goes back to me form but with out any values or try to print them but nothing.Please Help
<?php
function augusto_menu() {
$items = array();
$items['augusto_form'] = array(
'title' => 'Form augusto',
'description' => 'Form Drupal.',
'page callback' => 'drupal_get_form',
'page arguments' => array('augusto_form'),
'access callback' => TRUE
);
return
$items;
}
function augusto_form($form, &$form_state) {
$form['name'] = array(
'#type' => 'textfield',
'#title' => 'Name',
'#size' => 18,
'#maxlength' => 20,
'#required' => TRUE,
);
$form['last'] = array(
'#type' => 'textfield',
'#title' => 'last',
'#size' => 18,
'#maxlength' => 20,
'#required' => TRUE,
);
//tax
$dropdown_source = taxonomy_get_tree(4);
foreach ($dropdown_source as $item) {
$key = $item->tid;
$value = $item->name;
$dropdown_array[$key] = $value;
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('send'),
);
return $form;
}
function augusto_submit(&$form, &$form_state) {
$values = array(
$name = $form_state['values']['name'];
$last = $form_state['values']['last'];
drupal_goto("/augusto_form/".$name."/".$last); }
Change
function augusto_submit(&$form, &$form_state)
tofunction augusto_form_submit(&$form, &$form_state)