You are here

function finder_onoff_settings in Finder 7.2

Settings callback.

File

plugins/element_handler/onoff.inc, line 25
The finder on/off plugin handler.

Code

function finder_onoff_settings(&$data, $finder, $finder_element_id) {
  $items =& $data['items'];
  $element =& $finder->elements[$finder_element_id];
  $items['return_value'] = array(
    '#group' => 'form',
    '#item' => array(
      '#title' => t('Return value'),
      '#value' => $finder
        ->esetting($element, 'return_value') ? $finder
        ->esetting($element, 'return_value') : t('Default'),
    ),
    '#form' => array(
      'settings' => array(
        'return_value' => array(
          '#type' => 'textfield',
          '#title' => t('Return value'),
          '#default_value' => $finder
            ->esetting($element, 'return_value'),
          '#description' => t('Value element should return when selected.  Leave blank to default to 1.'),
          '#translatable' => FALSE,
        ),
      ),
    ),
  );
}