Form in two steps

  1. //Form 1 (a page)
  2.  
  3. <?php
  4. function oferta_mes_form()
  5. {
  6.  $form['#action'] = url('node/5'); //Importante, redirije con $_POST al siguiente form
  7.  $form['fprecio'] = array(
  8.     '#type' => 'textfield',
  9.     '#title' => t('Precio Oferta'),
  10.     '#size' => 30,
  11.     '#maxlength' => 30,
  12.     '#description' => null,
  13.     '#required' => TRUE,
  14.   );
  15.   $form['submit'] = array('#type' => 'submit', '#value' => t('Crear'));
  16.   return $form;
  17.  
  18. }
  19.  
  20. // Llamamos al render del formulario
  21. function oferta_mes_page() {
  22.   return drupal_get_form('oferta_mes_form');
  23. }
  24.  
  25. $out = oferta_mes_page();
  26. echo $out;
  27.  
  28. // Funcion Submit :)
  29. function oferta_mes_form_validate($elements, $form_state, $form_id= NULL) {
  30.  
  31. //algo de validacion aqui ~ validate!
  32.  
  33. }
  34. ?>
  35.  
  36.  
  37. //Form 2 (page)
  38. <?php
  39. echo $_POST['fprecio'];
  40. ?>