If this doesn't look familiar to you, then you're in for a rough hour. Use t() for titles, descriptions, and values Weight specifies relative vertical location of element on the form canvas D6; use “Save” instead of “Submit” (#287986) Don't forget to return your form!
drupal_get_form Primary way of invoking forms Manages all phases of form lifecycle Returns rendered html Can be parameterized to pass default values D7: returns form array, not HTML drupal_execute Programmatic counterpart to drupal_get_form Pass in form_id and $form_state['values'] Returns validation errors D7: becomes drupal_form_submit
Easiest way to alter a form Can alter your own or core/contrib forms Called on every form invocation Called after form creation but before rendering Also hook_form_FORM_ID_alter() for specific Remains in Drupal 7 Also exp
Goal: match a form's appearance to its context
Lightning (It's gonna be fast paced) FAPI (Expect lots of code) Jumpstart (Feel the power!) Doug Stumberger drupal.org = twitter = facebook = ‘dougstum’ DND Communications www.raceonedesign.com dstumberger @ hotmail.com
It's a Drupal talk, so… * * No cats were harmed in the creation of these slides.
Here, a standard imagefield form becomes both more functional and more consistent in presentation with the rest of the site. Combining form_alter and theming gives you the power to dramatically modify contrib module forms, icluding CCK-based forms. (after_build helps!)