You are here

function fb_devel_form_alter in Drupal for Facebook 6.2

File

./fb_devel.module, line 290
Makes development with Drupal for Facebook much easier. Keep this module enabled until you're confident your app works perfectly.

Code

function fb_devel_form_alter(&$form, $form_state, $form_id) {
  static $count;
  $count++;
  if (fb_verbose() === 'extreme' && FALSE) {

    // Disabled, somehow this breaks comment submission.
    $form['fb_devel'] = array(
      '#type' => 'fieldset',
      '#title' => t('Drupal for Facebook Devel'),
      '#description' => t('For debugging ahah problems......'),
      '#collapsible' => TRUE,
      '#collapsed' => FALSE,
    );
    $form['fb_devel']['submit'] = array(
      '#type' => 'submit',
      '#value' => t('fb_devel'),
      '#ahah' => array(
        'event' => 'click',
        'path' => 'fb/devel/js',
        'wrapper' => "fb_devel_wrapper{$count}",
        'method' => 'replace',
        'effect' => 'fade',
        'progress' => array(
          'type' => 'bar',
          'message' => 'XXX',
        ),
      ),
    );
    $form['fb_devel']['wrap'] = array(
      '#type' => 'markup',
      '#value' => "<div id=fb_devel_wrapper{$count}>This is the wrapper.</div>",
    );
  }
}