form

drupal_render form in block

  1.   //Load all associated vocabularies for this content type  
  2.   $vocabularies = taxonomy_get_vocabularies('my_content_type');
  3.   foreach ($vocabularies as $vocabulary) {
  4.     $formid = 'my_special_fil

Fix for Multipage User Registration

  1. <?php
  2. /**
  3. * Implementation of hook_menu()
  4. */
  5. function multipage_register_menu(){
  6.         $items['add/user'] = array(
  7.                 'title' => 'Add a user',
  8.                 'page callback' => 'multipage_register_wizard',
  9.                 'ac

Multipage User Registration

  1. <?php
  2. /**
  3. *       The purpose of this module is to take the user-registration form and make it
  4. *       multipage, where the pages change depending on the options selected during
  5. *       the last step.

Fix for Fix for Form theming

  1. <?php
  2. function formtheme_theme() {
  3.   return array(
  4.     'user_login' => array(
  5.       'arguments' => array('form' => array()),
  6.       'path' => drupal_get_path('theme', 'formtheme') .

Fix for Form theming

  1. <?php
  2. function formtheme_theme() {
  3.   return array(
  4.     'user_login' => array(
  5.       'arguments' => array('form' => array()),
  6.       'path' => drupal_get_path('theme', 'immortalgames') .

Form theming

  1. <?php
  2. function immortalgames_theme() {
  3.   return array(
  4.     'user_login' => array(
  5.       'arguments' => array('form' => array()),
  6.       'path' => drupal_get_path('theme', 'immortalgames') .

Fix for $form_state['redirect']

  1. function emailusers_compose_form_submit($form,&$form_state) {
  2.         $form_values = $form_state['values'];
  3.         $account = $form_values['to'];
  4.         drupal_mail ('emailusers','composemessage',$account->mail,user_

FAPI screw-up

  1.   if (arg(0) == 'node' && is_numeric(arg(1))) {
  2.     $node = node_load(arg(1));
  3.  
  4.     if ($node->field_event_registration[0]['nid']) {
  5.  
  6.       if ($form_id == 'webform_client_form_'.$node->field_eve

$form_state['redirect']

  1. function emailusers_compose_form_submit($form,&$form_state) {
  2.         $form_values = $form_state['values'];
  3.         $account = $form_values['to'];
  4.         drupal_mail ('emailusers','composemessage',$account->mail,user_

search block default value

  1. function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id) {
  2.   if ($form_id == 'search_block_form') {
  3.     $item = menu_get_item();
  4.     if ($item['map'][0] == 'search') {
Syndicate content