Forms

Update multiple checkboxes in a N:M relationship

  1. // Save the pods that were enabled for this room
  2. // $vars['pods'] has values that come from a form postback - from a field of type checkboxes
  3. // in the database, a room(rid) can have zero or multipl

CSS to hide Webform checkbox form label and line up options (display: inline disabled for debugging)

  1. /* CSS to hide Webform checkbox form label and line up options (display: inline disabled for debugging) */
  2. form#webform-client-form-121 {
  3.   clear: both;
  4. }
  5.  
  6. #webform-client-form-121 #webform-compo

Fix for Fix for Code

  1. <?php
  2.  
  3. function test_menu() {
  4.  
  5.   $items['test1'] = array(
  6.  
  7.     'title'             => 'test1',
  8.  
  9.     'page callback'     => 'drupal_get_form',
  10.  
  11.     'page arguments'    => array('test_1_form')

Fix for Fix for Code

  1. <?php
  2. function test_menu() {
  3.   $items['test1'] = array(
  4.     'title'             => 'test1',
  5.     'page callback'     => 'drupal_get_form',
  6.     'page arguments'    => array('test_1_form'),
  7.     'ty

Fix for Code

  1. <?php
  2.  
  3. function test_menu() {
  4.  
  5.   $items['test1'] = array(
  6.  
  7.     'title'             => 'test1',
  8.  
  9.     'page callback'     => 'drupal_get_form',
  10.  
  11.     'page arguments'    => array('test_1_form')

Code

  1. <?php
  2.  
  3. function test_menu() {
  4.  
  5.   $items['test1'] = array(
  6.  
  7.     'title'             => 'test1',
  8.  
  9.     'page callback'     => 'drupal_get_form',
  10.  
  11.     'page arguments'    => array('test_1_form')

Hook Form Alter Module

  1. <?php
  2. /**
  3. * Display help and module information
  4. * @param path which path of the site we're displaying help
  5. * @param arg array that holds the current path as would be returned from arg() function

In form alter, the required DOES work but the multiple doesn't

  1. function frankp_horoscope_form(&$node) {
  2.         $type = node_get_types('type', $node);
  3.        
  4.         $form['taxonomy'][FRANKP_HOROSCOPE_TAXONOMY_STAR_SIGNS] = taxonomy_form(FRANKP_HOROSCOPE_TAXONOMY_STAR_SIGNS);
  5.        

Fix for Fix for Example of displaying multiple checkboxes,alue selected with one v

  1. $form['option_occassions'] = array(
  2.    '#type' => 'checkboxes',
  3.   '#title' => t('Associated Occassions'),
  4.    '#options' => array(
  5.     1 => "Formal",
  6.     2 => "Social",
  7.     3 => "Xmas",
  8.     4 =>

Fix for Example of displaying multiple checkboxes,alue selected with one v

  1. $form['option_occassions'] = array(
  2.    '#type' => 'checkboxes',
  3.   '#title' => t('Associated Occassions'),
  4.    '#options' => array(
  5.     1 => "Formal",
  6.     2 => "Social",
  7.     3 => "Xmas",
  8.     4 =>
Syndicate content