Skip to main content

Add an MVC form to an external website with FXM

Abstract

Add an MVC form to a website not running Sitecore and include form data in analytics reports.

In the Sitecore Federated Experience Manager (FXM) application, you can use the Add Placeholder feature to add an MVC form to an external website not on Sitecore. As a result, in the Form Reports, you can analyze all submitted and analytical data from a web form located on an external site.

To add a form based on an MVC layout on the external website:

From the Sitecore Launchpad, open FXM and add an external website.

  1. In the Federated Experience Manager Dashboard, in the Tracked external websites section, select the relevant external site and then click Open in Experience Editor.

    3E0F916A714242D9AC6DACC767190E97.png

    On the Home tab, in the FXM Advanced group, click Add Placeholder.

    E70F9691557F402BBAFF1EF587F63E52.png
  2. On the external webpage, click the component that you want to add a placeholder to and click one of the three options that appear.

    • Add before - adds a Sitecore component before the current item.

    • Replace - replaces the current component with a Sitecore component.

    • Add after - adds a Sitecore component after the current component.

  3. In the Add Placeholder dialog box, in the Name field, enter a name for the new placeholder.

    In the Parent field, select a parent item and then click OK.

    9B4DB858ABEE44609493857725E3D0B4.png
  4. In the FXM Experience Editor, on the component that you have just added or replaced, click Add here.

    63A345B46C3F457393515A26C7E5EB67.png
  5. In the Select a Rendering dialog box, expand Renderings and then navigate to ModulesWeb Forms for Marketers and select MVC Form. Click Select.

  6. In the Create a New Form dialog box, give the form a unique name and choose either to Create a blank form or Select a form to copy.

  7. Click Next and follow the steps to Create a New Form. After clicking the Create button on the last step, the form appears on the page.

    Save the changes and publish the site.

    Note

    Because the publishing operation in FXM does not publish subitems, you should always publish the site through the Sitecore Desktop or Content Editor.

    The form is now available on the external website.