0

我正在尝试为 un Drupal 7 发送一个简单的服装,但我无法获得它来获取变量,它会回到我的表单但没有任何值或尝试打印它们但什么也没有。请帮助

<?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); }

4

1 回答 1

1

更改function augusto_submit(&$form, &$form_state)function augusto_form_submit(&$form, &$form_state)

于 2015-03-04T06:14:03.687 回答