This project is not covered by Drupal’s security advisory policy.
This module gives developers an easy, configurable way to re-post Drupal form submissionsto the Eloqua automated marketing platform. If you do not already have or are not considering an Eloqua subscription, this module is not for you. If you are not a developer or you do not have a developer to help you integrate Drupal with Eloqua, this module is also probably not for you.
Features
- Centralized configuration page for relevant Eloqua details,
- API function to asynchronously POST data to Eloqua,
- Easily extend functionality using simple Drupal form alters. See usage details for details.
Similar Modules
Eloqua Module - Integrates Drupal Webforms with Eloqua forms one-to-one. Eloqua API can also work with webforms, but this module may be friendlier for non-developers. These modules are not necessarily compatible.
Development and Status
The module is currently in beta, pending usage and testing by you, the user. Here are a few features this module may implement in the near future depending on demand. Post ideas, patches, and bugs in the issue queue, please!
- Expose more forms by default in the configuration page,
- Implement a non-asynchronous POST,
- Implement non-form related Eloqua functionality.
Usage Overview
The simplest way for you to integrate your form with this module and Eloqua is to create a small custom module that depends on this module. Your custom module will consist of a form alter and a validation function. Here is some sample code to get you started:
/**
* Implements hook_form_alter().
*/
function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
// Expose the form you want to the Eloqua API Configuration Settings.
case 'eloqua_api_admin_settings':
$form['eloqua_api_forms']['eloqua_api_enabled_forms']['#options']['MY_FORM_ID'] = 'My Form Name';
break;
// Add a validation function to the form you exposed above.
case 'MY_FORM_ID':
$form['#validate'][] = 'MY_MODULE_eloqua_validate';
break;
}
}
/**
* Validation handler to map Eloqua fields to be pushed.
*
* This is where you define what fields will be pushed to Eloqua.
*/
function MY_MODULE_eloqua_validate($form, &$form_state) {
// Maybe you want to send the e-mail address.
$fields['mail'] = $form_state['values']['mail'];
// Additional fields here...
$fields['foo'] = $form_state['values']['foo'][LANGUAGE_NONE][0]['value'];
$fields['bar'] = $form_state['values']['bar'];
$fields['baz'] = $form_state['values']['submitted']['baz'];
// To inform the field mappings above, you may want to uncomment the
// following line and submit the form to see the exact data structure:
// die('<pre>' . print_r($form_state['values'], TRUE));
// Add your field mappings here so the Eloqua API module sees them.
if (!empty($form_state['eloqua_values'])) {
$form_state['eloqua_values'] += $fields;
}
else {
$form_state['eloqua_values'] = $fields;
}
}
By default, the above code is what you will need; note however that depending on how you configure the module, you may not need a validation function. Full details are available in README.txt.
Project information
- Created by iamEAP on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.



