Creating Templates with the Interface Module


The forms Drupal automatically generates have always suffered from the 'silo' effect, where one form field is stacked on top of the other. This often presents a usability challenge for people operating the system, and generally requires some additional level of theming for developers in a really mature site.

Trellon recently released the interface module for Drupal, which is a stab at making it easier to change the look and feel of forms. Interface is a tool for authoring the interface for forms in Drupal by dragging and dropping form fields into predefined regions. This is one of those things you might need to see to see to understand - we have videos demonstrating the module at work.

These regions, the places on the page where you drop form fields, are put into something called a template. This article seeks to explain what a template file is and how to author your own. Our team has put a lot of effort into making it easy to use this module, and this includes authoring new templates. Interface ships with a number of templates we have already set up, and we understand it will be important for certain users to know how to author their own. Writing a template should be one of the simplest tasks you will ever have to do as a developer, right down there with Hello World and executing a print command. Read More >>>

Theming the User Registration Form in Drupal 6


When you are building an online community, one of your important jobs is to remove obstacles for users to sign up to create accounts. Drupal's user registration form, out of the box, is one of the simplest forms out there, and maybe that is why it is also one of the easiest things to overlook when building a site. By the time profile fields are added in, captchas are placed on the page, and other components have had their way with the fields that become part of it, the form can get rather messy and detract from the user experience. Read More >>>

Super-flexible forms in Drupal 5

By Dan Kurtz | Filed Under: Drupal, theming

It's common practice for theme function writers to give every div a class, so that it can be targetted by CSS. For us, this is especially important in forms, since our clients often ask us to lay out forms in complicated ways.

This was a problem in Drupal 5 (and earlier). Although form elements had ids, so specific elements could be accessed from Javascript and CSS, they are all encased in wrapper divs with class "form-item". This means there's no easy way to lay out a specific form item. Read More >>>