default_value

Everybody who once spent 5 minutes debugging drupal forms will spot the difference..

  1. $form['currency'] = array(
  2. '#type' => 'textfield',
  3. '#title' => t('currency'),
  4. '#size' => 60,
  5. '#maxlength' => 255,
  6. '#default_value' => $dateset->currency,
  7. '#description' =>t('currency')
  8. );

Looks an awfull lot like

  1. $form['currency'] = array(
  2. '#type' => 'textfield',
  3. '#title' => t('currency'),
  4. '#size' => 60,
  5. '#maxlength' => 255,
  6. '#value' => $dateset->currency,
  7. '#description' =>t('currency')
  8. );

Only the second one isn't much use in a form :)

Comments

Kris Buytaert's picture

#1 Kris Buytaert : Testing

Well.. if you think there is something wrong with your option list, you change it into a textfield.
And because you are lazy you obviously take the one closest to the one you are replacing to cut and past from.
So no I don't have a 60 digit currency field :)


Dries's picture

#2 Dries : A currency field with 60

A currency field with 60 digits (and a max. value of 255 digits) -- so what exactly are you building? You must be onto something. ;)