fapi

Fix for Fix for Fix for the multiple select #default_value

  1. $form['mylist']  = array(
  2.                 '#type' => 'select',
  3.                 '#title' => t('Select From List'),
  4.                 '#options' => array(
  5.                     0=>'A',
  6.                     1=>'B',
  7.                     2=>'C',

ENKNOT: Figuring out FAPI

  1. function email_name_admin_settings(){
  2.  
  3.  
  4.  
  5.       $values = unserialize(variable_get('email_name_edit_roles', serialize(array())));
  6.       sort($values);
  7.       dvm($values, 'SET UP');
  8.  
  9.       $form

Fix for Fix for Fix for the multiple select #default_value

  1. $form['mylist']  = array(
  2.                 '#type' => 'select',
  3.                 '#title' => t('Select From List'),
  4.                 '#options' => array(
  5.                     0=>'A',
  6.                     1=>'B',
  7.                     2=>'C',

Using Adding Checkboxes to table example

  1. <?php
  2.  
  3. // This function defines the URL to the page created etc.
  4. // See http&#58;//api.drupal.org/api/function/hook_menu/6
  5. function my_module_menu() {
  6.   $items = array();
  7.  
  8.   $items['my_module

Fix for When is an array not an array?

  1. // The moral of the story is to make sure that your arguments are correct for your form builder function.

When is an array not an array?

  1. function drupal_process_form($form_id, &$form, &$form_state) {
  2.   $form_state['values'] = array();
  3.  
  4.   krumo($form);  // Shows the expected FAPI array.
  5.   $form = form_builder($form_id, $form, $form_
xurizaemon's picture

drupal_render clearing default_value ... huh?

  1. function augforms_wall_invite_email_form($form_id, &$form_state = NULL) {
  2.   $num_invites = 5 ;
  3.   for ( $i = 0 ; $i < $num_invites ; $i++ ) {
  4.     $row = array() ;
  5.     $form['invite_name_'.$i] = arr

Fix for Fix for Fix for the multiple select #default_value

  1. $form['mylist']  = array(
  2.                 '#type' => 'select',
  3.                 '#title' => t('Select From List'),
  4.                 '#options' => array(
  5.                     0=>'A',
  6.                     1=>'B',
  7.                     2=>'C',

Fix for jQuery onChange not taking effect

  1. Here's the form:
  2.  
  3.  <div id="pager"><div class="pager-title">Test Feature Package 2</div>
  4. <form action="/node/19"  accept-charset="UTF-8" method="post" id="pager-navigate-form">
  5. <div>Go to: <div c

jQuery onChange not taking effect

  1. Here's the form:
  2.  
  3.  <div id="pager"><div class="pager-title">Test Feature Package 2</div>
  4. <form action="/node/19"  accept-charset="UTF-8" method="post" id="pager-navigate-form">
  5. <div>Go to: <div c
Syndicate content