Retrieve a form

get

/api/REST/1.0/assets/form/{id}

Retrieves the form specified by the id parameter. Note: You can also retrieve a form via REST 2.0 by using the endpoint REST/2.0/assets/form/{id}.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. Any other values passed are reset to complete by default. For more information, see Request depth.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, and FormStepWebTracking.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

Retrieve the form asset with Id #18:


GET /api/REST/1.0/assets/form/18
			

Response:


{
  "type": "Form",
  "currentStatus": "Draft",
  "id": "18",
  "createdAt": "1435261611",
  "createdBy": "19",
  "depth": "complete",
  "folderId": "7",
  "name": "Test Form",
  "permissions": "fullControl",
  "updatedAt": "1435261612",
  "updatedBy": "19",
  "archived": "false",
  "elements": [
    {
      "type": "FormField",
      "id": "174",
      "name": "Email Address",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100001",
      "dataType": "text",
      "displayType": "text",
      "fieldMergeId": "1",
      "htmlName": "emailAddress",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "175",
      "name": "Submit",
      "style": "{\"submitButtonStyleType\":\"standard\",\"submitButtonWidthStyle\":\"100px\",\"submitButtonHeightStyle\":\"24px\"}",
      "dataType": "text",
      "displayType": "submit",
      "htmlName": "submit",
      "validations": [
        
      ]
    }
  ],
  "emailAddressFormFieldId": "174",
  "html": "<div><form method=\"post\" name=\"UntitledForm-1534799851226\" action=\"https://s238011564.t.eloqua.com/e/f2\" onsubmit=\"return handleFormSubmit(this)\" id=\"form63\" class=\"elq-form\" ><input value=\"UntitledForm-1534799851226\" type=\"hidden\" name=\"elqFormName\"  /><input value=\"238011564\" type=\"hidden\" name=\"elqSiteId\"  /><input name=\"elqCampaignId\" type=\"hidden\"  /><div id=\"formElement0\" class=\"sc-view form-design-field sc-static-layout item-padding sc-regular-size\" ><div class=\"field-wrapper\" ></div><div class=\"individual field-wrapper\" ><div class=\"_100 field-style\" ><p class=\"field-p\" ><label for=\"field0\" class=\"label-position top \" >Email Address</label><input id=\"field0\" name=\"emailAddress\" type=\"text\" value=\"<eloqua type='emailfield' syntax='EmailAddress' />\" class=\"field-size-top-large\"  /></p></div></div></div><div id=\"formElement1\" class=\"sc-view form-design-field sc-static-layout item-padding sc-regular-size\" ><div class=\"field-wrapper\" ></div><div class=\"individual field-wrapper\" ><div class=\"_100 field-style\" ><p class=\"field-p\" ><input type=\"submit\" value=\"Submit\" class=\"submit-button\" style=\"font-size: 100%; height: 24px; width: 100px\"  /></p></div></div></div></form><script src=\"https://img03.en25.com/i/livevalidation_standalone.compressed.js\" type=\"text/javascript\" ></script><style type=\"text/css\" media=\"screen\" >.elq-form .loader{ vertical-align: middle; display: inline-block; margin-left:10px; border: 3px solid #f3f3f3;  border-radius: 50%;  border-top: 3px solid #3498db;  width: 20px;  height: 20px;  -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite;}\n@-webkit-keyframes spin {  0% { -webkit-transform: rotate(0deg); }  100% { -webkit-transform: rotate(360deg); } }\n@keyframes spin {  0% { transform: rotate(0deg); }  100% { transform: rotate(360deg); }}\n.LV_validation_message{ font-weight:bold; margin: 0 0 0 5px; }\n.LV_valid{ color:#00CC00; display:none; }\n.LV_invalid{ color:#CC0000; font-size:10px; }\n.LV_valid_field, input.LV_valid_field:hover, input.LV_valid_field:active, textarea.LV_valid_field:hover, textarea.LV_valid_field:active { outline: 1px solid #00CC00; }\n.LV_invalid_field, input.LV_invalid_field:hover, input.LV_invalid_field:active, textarea.LV_invalid_field:hover, textarea.LV_invalid_field:active { outline: 1px solid #CC0000; }</style><script type=\"text/javascript\" >var dom0 = document.querySelector('#form63 #field0');var field0 = new LiveValidation(dom0, {validMessage: \"\", onlyOnBlur: false, wait: 300});function handleFormSubmit(ele) { var submitButton = ele.querySelector('input[type=submit]'); var spinner = document.createElement('span'); spinner.setAttribute('class', 'loader'); submitButton.setAttribute('disabled', true); submitButton.style.cursor = 'wait'; submitButton.parentNode.appendChild(spinner); return true; }function resetSubmitButton(e){ var submitButtons = e.target.form.getElementsByClassName('submit-button'); for(var i=0;i<submitButtons.length;i++){  submitButtons[i].disabled = false; }  }function addChangeHandler(elements){  for(var i=0; i<elements.length; i++){   elements[i].addEventListener('change', resetSubmitButton); }  }var form = document.getElementById('form63'); addChangeHandler(form.getElementsByTagName('input')); addChangeHandler(form.getElementsByTagName('select')); addChangeHandler(form.getElementsByTagName('textarea'));var nodes = document.querySelectorAll('#form63 input[data-subscription]');  if (nodes) { for (i = 0, len = nodes.length; i < len; i++) {var status = nodes[i].dataset ? nodes[i].dataset.subscription : nodes[i].getAttribute('data-subscription'); if(status ==='true') {nodes[i].checked = true;}}};var nodes = document.querySelectorAll('#form63 select[data-value]');   if (nodes) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var selectedValue = node.dataset ? node.dataset.value : node.getAttribute('data-value'); if (selectedValue) { for (var j = 0; j < node.options.length; j++) { if(node.options[j].value === selectedValue) { node.options[j].selected = 'selected';break;}}}}}</script></div>",
  "isHidden": "false",
  "processingSteps": [
    {
      "type": "FormStepCreateUpdateContactFromFormField",
      "id": "188",
      "name": "Create / Update Contact, Prospect or Company",
      "execute": "always",
      "mappings": [
        
      ]
    }
  ],
  "processingType": "externalWebsite",
  "size": {
    "type": "Size",
    "width": "0",
    "height": "0"
  },
  "style": "{\"fieldSize\":\"medium\",\"labelPosition\":\"top\"}"
}
			
Back to Top