Marketpath CMS forms provide a simple and straightforward mechanism to quickly capture visitor data for just about any type of purpose. Inserting a form into an editable content area is just as easy. Both of these operations can be performed by a skilled content editor.

Standard Fields

A Marketpath CMS Form has the following default fields:

  • Internal Name
  • Title
  • Folder
  • Send Form Submission Emails To
  • Redirect URL
  • Has URL
  • Template Override
  • Fields

Send Form Submission Emails To will send an email to all recipients in this field with form details upon each submission.

Redirect URL is the page where a visitor will be sent upon successful form submission. 

Template Override is where a developer can set a custom template to be used for rendering this form. We do not recommend doing this at this time. See all considerations below.

Default Form HTML

Formatting, styling, and adding any type of custom functionality to a form is when a good developer is required. 

Like all objects in Marketpath CMS, we provide a default rendering for forms. Below you'll find the code for a simple contact us form. All unique ID's have been replaced to shrink the code. This is the default rendered HTML of a form in Marketpath CMS.

<script src="https://mp-resources.azureedge.net/tools/MPForms.1.2.0.min.js" defer></script>
<script src="https://www.google.com/recaptcha/api.js?render=explicit&onload=MPCaptchaRenderAll" defer></script>

<div class="mpform-default">
  <form enctype="multipart/form-data" id="[instance-id]">
      <span class="label">First Name</span>
      <input type="text" name="first_name" id="[instance-id]_first_name"/>
      <span class="label">Last Name</span>
      <input type="text" name="last_name" id=[instance-id]_last_name"/>
      <span class="label">Email Address</span>
      <input type="text" name="email_address" id="[instance-id]_email_address"/>
      <span class="mp-formfield-validation-message email_address_errormessage" style="display:none"></span>
      <span class="label">Comments or Questions?<span class="required" title="required">&nbsp;</span></span>
      <textarea name="comments" id="[instance-id]_comments"></textarea>
      <span class="mp-formfield-validation-message comments_errormessage" style="display:none"></span>
    <div class="subscribe_newsletter_conditional">
      <span class="label">Subscribe to the MP Financial Insights newsletter</span>
      <input type="checkbox" name="subscribe_newsletter" id="[instance-id]_subscribe_newsletter"/>
      <div class="g-recaptcha"></div>
      <span class="mp-formfield-validation-message [field-guid]_errormessage" style="display:none"></span>
      <button type="submit" id="[instance-id]_submit">Submit</button>
    <span class="mp-form-message [instance-id]" style="display:none"></span>
    window.addEventListener('DOMContentLoaded', function() {
                { "id":"first_name",
                  "name":"first_name" },
                { "id":"last_name",
                  "name":"last_name" },
                { "id":"email_address",
                  "validators": [ { "Type":"email"}] },
                { "id":"comments",
                  "requiredMessage":"This field is required" },
                { "id":"subscribe_newsletter",
                  "condition": {"Type":"exists","FieldID":"email_address","Invert":false} },
                { "id":"[field-guid]",
                  "required":true },
                { "id":"[field-guid],
              { action:"/mputils/[site-id]/submit-form/[form-id]",
                successHandler:'redirect: //demo.live01.dev.marketpath.site/thank-you' }

It is very likely this is not the HTML you want to output. At this time, we do not have any standard form templates you can use to build your own custom forms. However, understanding the logic above, you can attempt to implement your own forms as long as you follow the outline. You will likely have to provide your own validation and error handling. But it can be done.

Marketpath CMS is soon releasing a package manager feature that will allow you to download reusable code, including form templates. Keep an eye out for that.

Secure Data Considerations

As a developer, data security and privacy should be of  utmost concern. It's important to understand how data is transmitted and stored in Marketpath CMS. We recommend you avoid sending and storing credit card numbers, social security numbers, and other highly secure and private information.

Data Transmission

Marketpath CMS transmits data based on the protocol of the current page. If your site is not requiring a secure connection and using regular http then your data will be transmitted in plain text across the network. You must avoid this and ensure pages with forms are properly secured.

Even if your forms are properly secured using https, the data may be transmitted via plain text in an email notification. On each form there is a field with the label Send Form Submission Emails To. If there is a value in this field, all form field values will be emailed to those recipients. Since email is typically sent via plain text, the submitted data will also be in plain text.

Data Storage

Marketpath CMS stores its form data in plain text JSON format. The data is not encrypted when stored in the database. 

Other Considerations

Forms can be simple and straightforward, but they can also be complicated, difficult to manage, and even tougher to develop custom solutions for.

There is a significant amount of functionality baked into forms without requiring a single line of code. That includes form validation, grouping fields together, showing/hiding fields (and groups of fields) based on values entered into other fields, spam prevention (via Google reCAPTCHA), and more.

For what they are, forms in Marketpath CMS work well. However, there are a couple limitations of forms in their default rendered state that are good to be aware of as a developer:

  • The default form output is not ADA compliant (meaning it is not strictly speaking "accessible")
  • There is currently no solution to encrypt form submission values - so you should not ask for information such as credit card or social security numbers in a Marketpath form
  • You cannot customize form submission emails or send them to the person who submitted the form
  • You cannot change the recipient(s) of the form submission email based off of values in the submitted form
  • You can create a form without a redirect URL, but doing so falsely makes it appear as though submitting the form does nothing
  • It is difficult to show an in-place "thank-you" message on form submission
  • Users cannot "save" a form to return to later
  • There is no in-place solution for a paginated form, although you could piece one together with some clever form field organization and a small amount of javascript

Given all of these limitations, our recommendation is to use Marketpath forms for common simple functionality. 

Marketing Automation

One new feature you'll cover later in this course is marketing automation. With Marketpath's integration with Zapier, you can capture form submissions and perform a nearly unlimited number of actions on that data, such as:

  • Sending the visitor a thank you email
  • Adding the visitor to an email marketing list
  • Adding the visitor to your CRM
  • Starting a drip campaign for the visitor
  • Sending gated content in an email

We highly recommend learning about this feature and taking advantage of it. 



Please fill out the form below with your feedback or any questions you may have after working through the "Forms" lesson.

Your Name
Feedback / Questions