You are here

function nd_emptyregionrender_form in Node displays 6

Implementation of nd_pluginname_form().

File

plugins/emptyregionrender.inc, line 11
Plugin to render an empty region.

Code

function nd_emptyregionrender_form(&$form, $nd_display_settings) {
  $form['emptyregionrender'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#title' => t('Empty region render'),
    '#description' => t('Toggle regions you want to render when there are no fields in it or when field values are empty'),
  );
  $build_mode = $form['#build_mode'];
  $regions = nd_regions();
  foreach ($regions as $region => $title) {
    if ($region != 'disabled') {
      $form['emptyregionrender']['region-render-' . $region] = array(
        '#title' => $title,
        '#type' => 'checkbox',
        '#default_value' => nd_default_value($nd_display_settings, $build_mode, 'emptyregionrender', 'render', $region, ''),
      );
    }
  }
}