In http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference...

In the Form Controls table, #theme row is completely empty. I tried using it on textfield elements and indeed it worked, so the empty row is mistaken.

Later on today I will try to find out what elements exactly is #theme available for, and will post the information here.

I hope I'm not missing something very obvious.

Comments

AmrMostafa’s picture

I tried using #theme for every element in the Elements section in Forms API Reference, and these are the elements that support #theme:

  • button
  • checkbox
  • checkboxes
  • date
  • fieldset
  • file
  • form
  • hidden
  • markup
  • item
  • password
  • radio
  • radios
  • select
  • submit
  • textarea
  • textfield

That's EVERY element, except value and weight.

Let me know if I should digg for any needed details.

webchick’s picture

Should be everything except type = value, actually, since value is never displayed to the browser.

add1sun’s picture

Status: Active » Fixed

I've added the correct references for #theme to the API reference for HEAD, 5 and 4.7.

Anonymous’s picture

Status: Fixed » Closed (fixed)