Fix for Fix for FAPI problem

  1. <?php
  2. $form = array();
  3.  
  4. $form[1] = array(
  5.   '#type' => 'fieldset',
  6.   '#title' => 'Player data',
  7. );
  8. $form[1]['credits'] = array(
  9.   '#type' => 'textfield',
  10.   '#title' => 'Credits',
  11.   '#size' => 8,
  12.   '#maxlength' => 9,
  13.   '#default_value' => $user->credits,
  14. );
  15. $form[1]['credits-ok'] = array(
  16.   '#type' => 'submit',
  17.   '#value' => 'Submit',
  18.   '#submit' => array('cheats_user_credit'),
  19. );
  20.  
  21. $form[2] = array(
  22.   '#type' => 'fieldset',
  23.   '#title' => 'Bases data',
  24. );
  25. $form[2]['bases'] = array(
  26.   '#type' => 'select',
  27.   '#title' => 'Bases',
  28.   '#multiple' => TRUE,
  29.   '#size' => 10,
  30.   '#options' => $bases,
  31. );
  32. $form[2]['bases-ok'] = array(
  33.   '#type' => 'submit',
  34.   '#value' => 'Submit',
  35.   '#submit' => array('cheats_bases'),
  36. );
  37.  
  38. return $form;

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.