forms

Benjamin Melançon's picture

Form item classes

Tags

  • forms
  • Book element

  • Note
  • Drupal 7 much improves the classes added to the div surrounding form items (in Drupal 6 it was hard-coded to 'form-item'). The type of form element and the form element name are now added as form-item-type and form-item-name. You can see how Drupal does this (and see the theme function you would override to change this) at api.drupal.org/theme_form_element.

  • Explanation

  • This inability to control form element divs is a frustration from Drupal 6, mitigated in 7, and could go in a module building, form altering, or theming section.
  • Benjamin Melançon's picture

    Form element titles and the invisible #title_display property

    Book element

  • How to
  • Note: Forms are made to look how they are at two layers, the Forms API and the theme layer.

    [Words below are mostly Everett's verbatim]

    Drupal 7 provides a #title_display property that can be used with any form element that supports the #title property. The #title_display property tells the form system how to render #title

  • Explanation

  • In the intro to module development i guess...
  • Subscribe to forms