Drupal form theming

After creating a custom form with FAPI (Drupal's Form API), it can be hard to theme it just like you want. Here's how to do some basic form theming including the creation of a template (.tpl.php) for the form. Note that the theme hook name must be the same as the form name.

Drupal JS behaviors

This is a quick snippet showing a basic wrapper for your JS code in Drupal. To understand it, I recommend reading the breakdown of Drupal's JS on drupal.org, which was written for Drupal 6 but mostly applies to Drupal 7 too: https://drupal.org/node/304258