ELOQUA FORMS

Concatenating Eloqua form answers into one CRM field

When marketing adds custom questions, CRM mappings get messy fast. This pattern collects multiple Eloqua answers, formats them into a readable notes payload, and stores it in one hidden field that maps cleanly to Salesforce (or any CRM).

đź“… First published: 19 Aug 2023

⏱ 8 min read · Intermediate · 👥 Audience: Eloqua admins, marketing ops, CRM integration owners

Laptop showing marketing automation dashboards
"If Sales only sees half the story because the CRM mapping is tight, you are burning leads. Put the full context into one clean notes field."

Greg Staunton

Abstract representation of form inputs and data flowing into a system
The goal is simple: keep your CRM mapping stable, but still pass every custom answer to Sales in a readable way.

Why concatenate instead of adding CRM fields?

Eloqua forms change constantly. New qualifiers get added, old ones get removed, and different campaigns need different questions. If every new question requires a CRM field, you end up stuck in governance, backlog, and mapping changes. Concatenation gives you one stable integration point that can absorb change.

  • Sales gets the full context immediately, usually in Lead Notes or Description.
  • Marketing can add questions without creating a long tail of CRM fields.
  • Ops keeps one mapping stable and easy to test.

The high level pattern

You add one hidden field to the form, build a payload string on submit, then store it into that hidden field. Your CRM integration maps that single hidden field into a single CRM destination field.

  1. Add your custom questions as normal plus one hidden field (example: crmNotesPayload).
  2. On submit, read values from your chosen inputs, format as Label: Value lines.
  3. Join lines with \n, set the hidden field, and let Eloqua submit as usual.

What to include in the payload

Your payload is a sales tool, so keep it readable. Use stable ordering, omit empty values, and include only the fields that help qualification or routing.

Do

Use labels

Format as “Question: Answer” so it scans in seconds.

Do

Omit empty values

Skip unanswered questions to reduce noise.

Do

Keep ordering stable

A consistent layout builds trust with Sales.

Avoid

A single long sentence

It becomes unreadable in CRM and gets ignored.

Example payload (what Sales should see)

Market: Dental
In-house capability: Yes
Project size: Medium
Prototype required: No
Start date: Q2
Lifetime: 36 months
Target cost: €12.50
Expected volume: 1,000 units
Source URL: https://info.example.com/demo
Submitted: 2026-02-04T12:34:56.000Z

CRM mapping checklist

This is where most teams trip up. The script is the easy part. The win is keeping one stable integration mapping while your form questions evolve.

Eloqua field Type CRM destination Notes
crmNotesPayload Hidden text Lead Notes / Description / Custom long text This is the only field you need to map for the custom answers.
EmailAddress Email Email Standard identity field. Keep your existing mapping.
FirstName / LastName Text First Name / Last Name No change required. This pattern does not interfere.
ProductInterest (optional) Picklist Product / Interest routing field Keep routing keys separate if they drive assignment rules.

Minimum viable mapping

  • Create one hidden form field: crmNotesPayload.
  • Map it to one CRM long text field.
  • Do not map each custom question individually unless you truly need reporting on it.
  • Keep any routing fields (region, product line, partner) as separate mapped fields.

Copy paste code: concatenate fields into a hidden CRM notes field

This version is intentionally boring and reliable. It uses input name attributes (more stable than IDs), supports radios and checkbox groups, and writes a newline separated payload into a hidden field called crmNotesPayload.

<!-- Add this hidden field to your Eloqua form (create the field in Eloqua and include it on the form) -->
<input type="hidden" name="crmNotesPayload" id="crmNotesPayload" value="" />

<script>
(function () {
  "use strict";

  // 1) Configure: use the input "name" attributes from your Eloqua form HTML
  var FIELDS = [
    { name: "customMarket", label: "Market" },
    { name: "customInHouseFPGA", label: "In-house capability" },
    { name: "projectSize", label: "Project size" },
    { name: "customPrototype", label: "Prototype required" },
    { name: "customStartdate", label: "Start date" },
    { name: "customLifetime", label: "Lifetime" },
    { name: "customTargetcost", label: "Target cost" },
    { name: "customExpectedVolume", label: "Expected volume" }
  ];

  function getValueByName(formEl, fieldName) {
    var el = formEl.querySelector('[name="' + fieldName + '"]');
    if (!el) return "";

    // Checkbox groups
    if (el.type === "checkbox") {
      var checked = formEl.querySelectorAll('[name="' + fieldName + '"]:checked');
      if (!checked || !checked.length) return "";
      return Array.prototype.map.call(checked, function (c) { return (c.value || "").trim(); }).join(", ");
    }

    // Radios
    if (el.type === "radio") {
      var selected = formEl.querySelector('[name="' + fieldName + '"]:checked');
      return selected ? (selected.value || "").trim() : "";
    }

    // Text, select, textarea
    return (el.value || "").trim();
  }

  function buildNotesPayload(formEl) {
    var lines = [];

    FIELDS.forEach(function (f) {
      var val = getValueByName(formEl, f.name);
      if (!val) return;
      lines.push(f.label + ": " + val);
    });

    // Optional context for Sales and Ops
    try {
      lines.push("Source URL: " + window.location.href);
      lines.push("Submitted: " + new Date().toISOString());
    } catch (e) {}

    return lines.join("\\n");
  }

  function attach(formEl) {
    if (!formEl) return;

    formEl.addEventListener("submit", function () {
      var payload = buildNotesPayload(formEl);

      // Hidden destination
      var hidden = formEl.querySelector('#crmNotesPayload, [name="crmNotesPayload"]');
      if (hidden) hidden.value = payload;
    }, true);
  }

  // Bind to all forms on the page (safe default)
  var forms = document.querySelectorAll("form");
  Array.prototype.forEach.call(forms, attach);
})();
</script>

Map crmNotesPayload to a long text destination in your CRM (Lead Notes, Description, or a dedicated long text field). Then test a full submission and confirm the line breaks render in the CRM UI.

Testing checklist

Do these tests once and you will not have to keep revisiting this pattern. The goal is confidence that the payload always arrives readable in CRM.

1) Empty answers are skipped

Leave half the questions blank and submit. Confirm the payload contains only answered questions, in the same order.

Expected: No empty “Label:” lines.

2) Checkbox and radio behaviour

Test a checkbox group with multiple selections and a radio group with one selection.

Expected: Checkboxes join as “A, B, C”. Radios output the selected value.

3) Special characters and accents

Enter values like “R&D”, “São”, “Müller”, and punctuation. Confirm nothing breaks and the CRM stores it correctly.

Expected: Characters preserved, no encoding issues.

4) Long answers and CRM limits

Paste a long paragraph into one field. Confirm the CRM field does not truncate silently or cut mid line.

Expected: No truncation, or a documented maximum if unavoidable.

5) Line breaks in the Sales UI

Confirm the CRM UI displays the payload with line breaks, or at least in a readable wrapped format.

Expected: One question per line in the UI where Sales reads it.

6) Multiple forms on one page

If the page has multiple forms, submit each one. Confirm the payload writes to the hidden field inside the correct form.

Expected: No cross form contamination.

Operational tip

Put one test lead through after any form edit. If your script uses stable input names, it rarely breaks, but this keeps you ahead of surprises.

FAQ

Should I store routing fields in the payload too?

If a field drives assignment rules or reporting, keep it separately mapped. Use the payload for human readable context that would otherwise be lost.

Do I need IDs or can I use names?

Use input names. IDs can change depending on how the form is embedded or edited. Names are usually the most stable.

Can I add a section heading to the payload?

Yes. Add a first line like “Custom Questions:” then a blank line before the labels. Keep it plain text so it renders anywhere.

Does this impact privacy or consent?

Treat it like any other form submission data. Only include what you are entitled to collect and ensure your privacy notice covers what you store in CRM.

Want me to implement this directly in your Eloqua templates?

If you send me the form HTML (or the Eloqua form embed) and confirm the CRM destination field, I can tailor the field map, payload formatting, and edge case handling so it works cleanly across your landing pages.