You are here

function wf_crm_ajax in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 includes/wf_crm_webform_ajax.inc \wf_crm_ajax()
  2. 7.3 contact_component.inc \wf_crm_ajax()

Drupal page callback to serve AJAX requests.

Parameters

$key: Type of AJAX request

$input: User input

Prints json output

1 string reference to 'wf_crm_ajax'
webform_civicrm_menu in ./webform_civicrm.module
Implements hook_menu().

File

includes/wf_crm_webform_ajax.inc, line 210

Code

function wf_crm_ajax($key, $input = '') {
  $processor = new wf_crm_webform_ajax();
  if ($key == 'stateProvince' || $key == 'county') {
    $processor
      ->{$key}($input);
  }
  elseif (strpos($key, '-')) {
    $processor
      ->contactAjax($key);
  }
  drupal_access_denied();
}