You are here

function rules_forms_element_value_info_alter in Rules Forms Support 7.2

Info alter callback for the element has value condition.

Sets the value field according to the type of value the element uses.

1 string reference to 'rules_forms_element_value_info_alter'
rules_forms_rules_condition_info in ./rules_forms.rules.inc
Implements hook_rules_condition_info().

File

includes/rules_forms.eval.inc, line 13
Evaluation functions for Rules Forms module.

Code

function rules_forms_element_value_info_alter(&$element_info, $element) {
  $element->settings += array(
    'data:select' => NULL,
  );
  if ($wrapper = $element
    ->applyDataSelector($element->settings['data:select'])) {
    if ($wrapper instanceof RulesFormsElementWrapper) {
      $info = $wrapper
        ->info();
      $element_info['parameter']['value']['type'] = $wrapper
        ->getElementDataType();
      $element_info['parameter']['value']['options list'] = !empty($info['options list']) ? 'rules_data_selector_options_list' : FALSE;
    }
  }
}