You are here

function context_field_context_condition::options_form in Context Field 7

Options form. Provide additional options for your condition.

Overrides context_condition::options_form

File

plugins/context_field_context_condition.inc, line 25
context_field_context_condition.inc

Class

context_field_context_condition
Expose node views/node forms of specific node types as a context condition.

Code

function options_form($context) {
  $defaults = $this
    ->fetch_from_context($context, 'options');
  $form = array();
  $form['context_field_category'] = array(
    '#type' => 'textfield',
    '#title' => t('Category'),
    '#description' => t('The category of contexts for which you\'d like to utilize this context. For example, a category named blog for blog related contexts, which would differ from the contexts that could be used for basic pages.'),
    '#default_value' => isset($defaults['context_field_category']) ? $defaults['context_field_category'] : '',
  );
  return $form;
}