Webform Service

The WebFormService is used to work with web forms within Infusionsoft.


WebFormService.getMap

This retrieves the web form names and Id numbers from the application.

Required Parameters

Parameter Name Type Definition
privateKey string Your Infusionsoft API key

Returns

(array) the title and Id number for each web form within the system

Sample Request

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
  <methodName>WebFormService.getMap</methodName>
  <params>
    <param>
      <value><string>privateKey</string></value>
    </param>
  </params>
</methodCall>

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>
              6
            </name>
            <value>
              test
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>

PHP iSDK Sample

$map = $app->getWebFormMap();

WebFormService.getHTML

This retrieves the HTML for the given web form

Required Parameters

Parameter Name Type Definition
privateKey string Your Infusionsoft API key
webFormId int The Id to your web form

Returns

(string) the HTML for this web form

Sample Request

<?xml version="1.0"?>
<methodCall>
<methodName>WebFormService.getHTML</methodName>
	<params>
	<param>
		<value><string>c94a1f2b395a9ab97d4263b37f7b0923</string></value>
	</param>
	<param>
		<value><int>6</int></value>
	</param>
	</params>
</methodCall>

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
  <params>
    <param>
      <value>
        &lt;html style="height:100%; margin:0;
        padding:0"&gt;&lt;head&gt;&lt;meta content="text/html; charset=UTF-8"
        http-equiv="Content-Type" /&gt;&lt;style type="text/css"&gt;.beta-base
        .preheader, .beta-base .header, .beta-base .sidebar, .beta-base .body,
        .beta-base .footer, #mainContent { text-align: left; } .beta-base
        .preheader, .beta-base .header, .beta-base .body, .beta-base .sidebar,
        .beta-base .leftSidebar, .beta-base .rightSidebar, .beta-base .footer {
        margin: 0; padding: 0; border: none; white-space: normal; line-height:
        normal; } .beta-base .title, .beta-base .subtitle, .beta-base .text,
        .beta-base img { margin: 0; padding: 0; background: none; border: none;
        white-space: normal; line-height: normal; } .beta-base .bodyContainer
        td.preheader{ padding: 10px 0; } .beta-base .bodyContainer td.header {
        padding: 0; height: 30px; } .beta-base .bodyContainer td.body,
        .beta-base .bodyContainer td.footer, .beta-base .bodyContainer
        td.sidebar, .beta-base .bodyContainer td.leftSidebar, .beta-base
        .bodyContainer td.rightSidebar { padding: 20px; } .beta-base
        .bodyContainer td.header p, .beta-base .bodyContainer td.preheader p,
        .beta-base .bodyContainer td.body p, .beta-base .bodyContainer td.footer
        p, .beta-base .bodyContainer td.sidebar p, .beta-base .bodyContainer
        td.leftSidebar p, .beta-base .bodyContainer td.rightSidebar p { margin:
        0; color: inherit; } .beta-base .bodyContainer td.header div.title,
        .beta-base .bodyContainer td.preheader div.title, .beta-base
        .bodyContainer td.body div.title, .beta-base .bodyContainer td.footer
        div.title, .beta-base .bodyContainer td.sidebar div.title, .beta-base
        .bodyContainer td.leftSidebar div.title, .beta-base .bodyContainer
        td.rightSidebar div.title, .beta-base .bodyContainer td.header
        div.subtitle, .beta-base .bodyContainer td.preheader div.subtitle,
        .beta-base .bodyContainer td.body div.subtitle, .beta-base
        .bodyContainer td.footer div.subtitle, .beta-base .bodyContainer
        td.sidebar div.subtitle, .beta-base .bodyContainer td.leftSidebar
        div.subtitle, .beta-base .bodyContainer td.rightSidebar div.subtitle,
        .beta-base .bodyContainer td.header div.text, .beta-base .bodyContainer
        td.preheader div.text, .beta-base .bodyContainer td.body div.text,
        .beta-base .bodyContainer td.footer div.text, .beta-base .bodyContainer
        td.sidebar div.text, .beta-base .bodyContainer td.leftSidebar div.text,
        .beta-base .bodyContainer td.rightSidebar div.text { overflow: auto; }
        .beta-base .optout { margin-bottom: 10px; margin-top: 10px; }
        div.infusion-captcha { width: 220px; padding: 10px; }
        div.infusion-captcha input, div.infusion-captcha select,
        div.infusion-captcha textarea { width: 95%; display: inline-block;
        vertical-align: middle; } table.infusion-field-container
        td.infusion-field-input-container input[type='text'],
        table.infusion-field-container td.infusion-field-input-container
        input[type='password'], table.infusion-field-container
        td.infusion-field-input-container textarea { width: 98%; /* must be 98%
        to make the snippet-menu line up due to border width */ margin: 0; }
        table.infusion-field-container td.infusion-field-input-container select
        { width: 101%; *width: 102%; /* this one for IE */ margin: 0; }
        table.infusion-field-container td.infusion-field-label-container {
        padding-right: 5px; } td.header .image-snippet img { vertical-align:
        bottom; } #webformErrors { color: #990000; font-size: 14px; } html, body
        { margin: 0; padding: 0; height: 100%; } .infusion-form { margin: 0;
        height: 100%; } .infusion-option { display: block; }
        &lt;/style&gt;&lt;style type="text/css"&gt;.beta-font-b .title,
        .beta-font-b .title p { font-size: 20px; font-weight: bold; font-family:
        arial,sans-serif; } .beta-font-b .subtitle, .beta-font-b .subtitle p {
        font-size: 11px; font-weight: normal; font-family: arial,sans-serif; }
        .beta-font-b .text, .beta-font-b p { font-size: 12px; font-family:
        arial,sans-serif; } .beta-font-b .preheader .text, .beta-font-b
        .preheader .text p { font-size: 11px; font-family: arial,sans-serif; }
        .beta-font-b .footer a, .beta-font-b .footer a { font-size: 11px; }
        .beta-font-b .footer .text { font-size: 10px; font-family:
        verdana,sans-serif; } .beta-font-b .sidebar .title, .beta-font-b
        .leftSidebar .title, .beta-font-b .rightSidebar .title { font-size:
        15px; font-weight: bold; font-family: arial,sans-serif; } .beta-font-b a
        { font-family: arial,sans-serif; } .beta-font-b .sidebar .subtitle,
        .beta-font-b .leftSidebar .subtitle, .beta-font-b .rightSidebar
        .subtitle { font-size: 12px; font-family: arial, sans-serif; }
        .beta-font-b .sidebar .text, .beta-font-b .leftSidebar .text,
        .beta-font-b .rightSidebar .text { font-size: 11px; font-family: arial,
        sans-serif; } .infusion-field-label-container { font-size: 14px;
        font-family: arial,sans-serif; } .infusion-field-input-container {
        color: #000000; font-size: 12px; } .infusion-option label { color:
        #000000; font-size: 14px; font-family: arial,sans-serif; }
        &lt;/style&gt;&lt;style type="text/css"&gt;/* order is very important!
        Overridden classes MUST come first */ .blue .background {
        background-color: #3B607E; } .blue a { color: #0934C1; } .blue .text {
        color: #000000; } .blue .preheader a { color: #D4D4D4; } .blue
        .preheader .text { color: #D4D4D4; } .blue .header { background-color:
        #EEEEEE; } .blue .title { color: #3B607E; } .blue .subtitle { color:
        #BD3919; } .blue .sidebar .title, .blue .leftSidebar .title, .blue
        .rightSidebar .title { color: #3B607E; } .blue .sidebar .subtitle, .blue
        .leftSidebar .subtitle, .blue .rightSidebar .subtitle { color: #E74F46;
        } .blue .footer { background-color: #EEEEEE; } .blue .footer a { color:
        #0934C1; } .blue .footer .text { color: #2A2928; } .blue
        .infusion-field-label-container { color: #000000; font-size: 14px;
        font-family: arial, sans-serif; } .blue .infusion-field-input-container
        { color: #000000; font-size: 12px; } .blue .infusion-option label {
        color: #000000; font-size: 14px; font-family: arial, sans-serif; }
        &lt;/style&gt;&lt;style
        type="text/css"&gt;.infusion-field-label-container { text-align:Left; }
        .infusion-field-label-container { vertical-align:Middle; }
        .infusion-field-input-container { width:200px; } .bodyContainer {
        width:425px; } &lt;/style&gt;&lt;script
        src="https://vuurr24.infusionsoft.com/app/webTracking/getTrackingCode?trackingId=ffa91a687d65b564d650842ee54ec3ef" type="text/javascript"&gt;&lt;/script&gt;&lt;/head&gt;&lt;body leftmargin="0" marginheight="0" marginwidth="0" offset="0" style="margin-bottom: 0px; margin-top: 0px"&gt; &lt;form accept-charset="UTF-8" action="https://vuurr24.infusionsoft.com/app/form/process/14fdd03c2d776633a1593b36969bf6ab" class="infusion-form" method="POST" name="test" onsubmit="var form = document.forms[0]; var resolution = document.createElement('input'); resolution.setAttribute('id', 'screenResolution'); resolution.setAttribute('type', 'hidden'); resolution.setAttribute('name', 'screenResolution'); var resolutionString = screen.width + 'x' + screen.height; resolution.setAttribute('value', resolutionString); form.appendChild(resolution); var pluginString = ''; for (var i = 0; i &amp;lt; navigator.plugins.length; i++) { pluginString += navigator.plugins[i].name + ','; } pluginString = pluginString.substring(0, pluginString.lastIndexOf(',')); var plugins = document.createElement('input'); plugins.setAttribute('id', 'pluginList'); plugins.setAttribute('type', 'hidden'); plugins.setAttribute('name', 'pluginList'); plugins.setAttribute('value', pluginString); form.appendChild(plugins); var java = navigator.javaEnabled(); var javaEnabled = document.createElement('input'); javaEnabled.setAttribute('id', 'javaEnabled'); javaEnabled.setAttribute('type', 'hidden'); javaEnabled.setAttribute('name', 'javaEnabled'); javaEnabled.setAttribute('value', java); form.appendChild(javaEnabled);"&gt; &lt;input name="inf_form_xid" type="hidden" value="14fdd03c2d776633a1593b36969bf6ab" /&gt;&lt;input name="inf_form_name" type="hidden" value="test" /&gt;&lt;input name="infusionsoft_version" type="hidden" value="1.25.5.27" /&gt; &lt;div class="blue beta-base beta-font-b" id="mainContent" style="height:100%"&gt; &lt;table cellpadding="10" cellspacing="0" class="background" style="height: 100%; width: 100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="center" valign="top"&gt; &lt;table bgcolor="#FFFFFF" cellpadding="20" cellspacing="0" class="bodyContainer" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td bgcolor="#FFFFFF" class="body" sectionid="body" valign="top"&gt; &lt;div class="text" id="webformErrors" name="errorContent"&gt; &lt;/div&gt; &lt;div&gt; &lt;table class="infusion-field-container" style="width:100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="infusion-field-label-container"&gt;&lt;label for="inf_field_FirstName"&gt;First Name *&lt;/label&gt;&lt;/td&gt;&lt;td class="infusion-field-input-container" style="width:200px"&gt;&lt;input id="inf_field_FirstName" name="inf_field_FirstName" type="text" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;div&gt; &lt;table class="infusion-field-container" style="width:100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="infusion-field-label-container"&gt;&lt;label for="inf_field_Email"&gt;Email *&lt;/label&gt;&lt;/td&gt;&lt;td class="infusion-field-input-container" style="width:200px"&gt;&lt;input id="inf_field_Email" name="inf_field_Email" type="text" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;div&gt; &lt;div style="height:25px; line-height:25px"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;table class="infusion-field-container" style="width:100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="infusion-field-input-container" style="width:200px"&gt;&lt;span class="infusion-option"&gt;&lt;input id="inf_option_Signmeupforthenewsletter" name="inf_option_Signmeupforthenewsletter" style="margin-right:3px" type="checkbox" value="230" /&gt;&lt;label for="inf_option_Signmeupforthenewsletter"&gt;Sign me up for the newsletter&lt;/label&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;div&gt; &lt;div style="height:15px; line-height:15px"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;div class="infusion-submit" style="text-align:left"&gt; &lt;input style="" type="submit" value="Submit" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt;&lt;/html&gt;
      </value>
    </param>
  </params>
</methodResponse>

PHP iSDK Sample

$formId = 6;
$form = $app->getWebFormHtml($formId);