Eloqua WordPress Forms Plugin

WordPress plugin that automatically syncs Oracle Eloqua marketing forms to WordPress, enabling seamless form management and reducing manual updates across platforms.

Project Overview

A custom WordPress plugin that bridges the gap between Oracle Eloqua’s marketing automation platform and WordPress content management. Built while working at Axial/Jornaya, this plugin automated the process of importing, syncing, and displaying Eloqua forms on WordPress sites, eliminating the manual copy-paste workflow that marketing teams struggled with.

The Problem

Marketing teams using Eloqua to create forms faced a significant workflow challenge when displaying those forms on WordPress websites. The typical process required:

  • Manually copying form HTML from Eloqua
  • Pasting it into WordPress posts/pages
  • Updating forms in both systems when changes were needed
  • Tracking which forms were where
  • Dealing with broken forms when Eloqua updated their form structure

This manual process was time-consuming, error-prone, and created inconsistencies between Eloqua and WordPress. Forms would fall out of sync, breaking lead capture workflows.

The Solution

Built a WordPress plugin that:

  • Automatically imports all Eloqua forms via the Eloqua REST API
  • Creates a custom post type in WordPress to store form metadata
  • Syncs bidirectionally to keep forms up-to-date
  • Provides a simple shortcode for embedding forms anywhere in WordPress
  • Handles form variables and redirect URLs automatically

The plugin transformed form management from a manual, error-prone process into a fully automated sync that required zero intervention.

Key Features

  • Automatic Synchronization: One-click import of all Eloqua forms
  • Custom Post Type: Forms stored as WordPress posts with metadata
  • Smart Sync: Tracks last update timestamps to only sync changed forms
  • Flexible Shortcode: [show_form] with multiple display options
  • Form Variables: Auto-populates URL parameters into form fields
  • Redirect Handling: Supports custom thank-you page redirects
  • Bulk Operations: Imports up to 1,000 forms at once

Technical Implementation

Architecture

// Core plugin structure
- EloquaRequest Class: API communication layer
- Custom Post Type: 'eloqua_form' for form storage
- Sync Engine: Compares Eloqua forms with WordPress posts
- Shortcode Handler: Renders forms on frontend

API Integration

Eloqua REST API v2.0

  • Base URL: https://secure.p03.eloqua.com/API/REST/2.0
  • Endpoint: /assets/forms
  • Authentication: Basic Auth (username/password)
  • Sync strategy: Timestamp-based incremental updates

Synchronization Logic

The plugin implements intelligent syncing:

  1. Fetch Forms: Retrieves all forms from Eloqua API
  2. Compare: Matches Eloqua form IDs with existing WordPress posts
  3. Create: Adds new forms as WordPress posts
  4. Update: Refreshes forms that changed in Eloqua
  5. Delete: Removes forms deleted in Eloqua
  6. Track: Stores last sync timestamp for incremental updates

Shortcode Usage

// Basic form display
[show_form eloqua_form_id="123"]

// With custom redirect
[show_form post_id="456" redirect_to="https://example.com/thanks"]

// With title override
[show_form eloqua_form_id="789" title="Subscribe to Newsletter"]

Technology Stack

  • WordPress Core: Custom post types, shortcodes, hooks
  • PHP: Server-side logic and API integration
  • Eloqua REST API v2.0: Form data retrieval
  • JavaScript: Form enhancement and variable passing
  • HTML/CSS: Form rendering and styling

Business Impact

For marketing teams using this plugin:

  • Time Savings: Eliminated 2-3 hours/week of manual form updates
  • Accuracy: 100% form sync accuracy vs. manual errors
  • Consistency: Single source of truth for all forms
  • Flexibility: Easy form deployment across entire WordPress site
  • Maintenance: Zero ongoing maintenance for form updates

Use Cases

Lead Capture Forms

Display Eloqua forms on blog posts, landing pages, and resource pages with automatic lead routing to Eloqua.

Event Registration

Embed event registration forms that sync registrants directly to Eloqua campaigns.

Content Gating

Gate premium content behind Eloqua forms, capturing lead data before download.

Newsletter Signups

Add newsletter subscription forms anywhere in WordPress with automatic list management in Eloqua.

Technical Challenges Solved

Challenge 1: Form HTML Sanitization

Eloqua’s form HTML contained platform-specific markup that conflicted with WordPress’s content filters.

Solution: Implemented HTML cleaning function to strip incompatible tags while preserving form functionality.

Challenge 2: API Rate Limiting

Bulk imports of 1,000+ forms could hit Eloqua’s API rate limits.

Solution: Implemented batched requests with exponential backoff and timestamp-based incremental syncing.

Challenge 3: Form Variable Passing

URL parameters needed to flow through to Eloqua for campaign tracking.

Solution: Built JavaScript layer to capture query parameters and populate hidden form fields automatically.

Installation & Setup

# 1. Configure credentials in eloqua-forms.php
define('ELOQUA_COMPANY', 'your-company');
define('ELOQUA_USERNAME', 'your-username');
define('ELOQUA_PASSWORD', 'your-password');

# 2. Package and upload
zip -r wp-eloqua-forms.zip wp-eloqua-forms/
# Upload to /wp-content/plugins/

# 3. Activate in WordPress
# WordPress Admin → Plugins → Activate "Eloqua Forms"

# 4. Import forms
# WordPress Admin → Eloqua Forms → Import Forms

Integration with Advanced Custom Fields

The plugin was designed to work seamlessly with Advanced Custom Fields (ACF), allowing content editors to select forms from a dropdown rather than remembering form IDs.

Lessons Learned

  • API versioning matters: Eloqua’s API evolved, requiring version locking
  • Incremental sync is essential: Full syncs don’t scale
  • Custom post types provide excellent data organization in WordPress
  • Form HTML is fragile: Need robust sanitization and validation
  • Authentication security: Basic auth was expedient but OAuth2 would be better

Contributors

  • Cody Boyte - Product manager & refinement
  • Ryan Ghods - Core development

Impact

This plugin enabled marketing teams at Axial and Jornaya to:

  • Manage 100+ forms across multiple WordPress sites
  • Reduce form update time from hours to seconds
  • Eliminate form sync errors entirely
  • Deploy new campaigns faster with instant form availability
  • Track lead attribution more accurately with automatic variable passing

  • Created by: Cody Boyte
  • Organization: Axial / Jornaya
  • Years Active: 2014-2019
  • License: GPLv2
  • Status: Not currently maintained (still functional with WordPress 4.x+)