fieldset_helper_test

contrib-jrockowitz/fieldset_helper/fieldset_helper.admin.inc, line 94

Versions
6
fieldset_helper_test()

Test page for the 'Fieldset helper' module.

Code

<?php
function fieldset_helper_test() {
  $output = '';

  // Test FAPI fieldsets
  $output .= '<h3>'. t('Test collapsible fieldsets associated with a FAPI form') .'</h3>';
  $output .= drupal_get_form('fieldset_helper_test_form');

  // Test unassociated fieldsets
  $output .= '<h3>'. t('Test a collapsible fieldset that is not associated with a form or node') .'</h3>';
  $element = array(
    '#type' => 'fieldset',
    '#title' => t('The un-associated fieldset'),
    '#value' => '<div>'. t('Testing the un-associated fieldset') .'</div>',
    '#collapsible' => TRUE,
  );
  $output .= theme('fieldset', $element);

  // Test unassociated fieldsets
  $output .= '<h3>'. t('Test a collapsible fieldset that is just plain html') .'</h3>';
  $output .= '<fieldset class="collapsible"><legend>The plain html fieldset</legend><div>';
  $output .= t('Testing a fieldset that is plain html');

  $output .= '<fieldset class="collapsible"><legend>A nested plain html fieldset</legend><div>'. t('Testing a nested fieldset that is plain html') .'</div></fieldset>';

  $output .= '</div></fieldset>';


  return $output;
}
?>