How to pre-populate the visual composer from Salesforce

Last updated Apr 23 2018

FormTitan allows you to have your forms pre-populated.This is simple and can easily be achieved by adding a string to the form URL (containing Field ID's and values). For more information read how to pre populate your form

well guess what? now you can also have your visual composer automatically populated from Salesforce. The visual composer usually works wth a Salesforce action button which triggers it, however you can also pre-populate it from Salesforce without using the button.

Following is an example to show you how it's done:
In this example we will create a form that has only 3 elements in it - 2 hidden elements and a Visual composer element.
The hidden fields will store values from Salesforce behind the scenes (one will be filled with Account ID number, the other will be filled with Account name), and the Visual composer will show a  PDF, that will contain and display those values.  We will add a short string to the URL, and once the form is loaded the PDF will be populated automatically (without the use f a trigger button).

1- Create a new blank form
2- In the form builder - Give your form a name ("Properties" panel > Form > Settings > General > Basic > General)
3- Drag a "Hidden" element (from the "Elements" panel > Widgets category (on the left)  onto the canvas,

4-

Go to the Hidden "Element" settings ("Properties" panel > Element > Settings > Basic) 
and change the name to: id_1

5-

Drag another "Hidden" element and change its name to: id_2
6- Now configure the "Get" Salesforce integration and map these hidden fields to SF fields.
Go to: Properties" panel > Form > Settings > Salesforce Integration > Get From Salesforce

7-

Press on the "Map fields" button
8-  Authenticate with Salesforce


Choose the "Account" object
Turn on the "Execute on form load" checkbox


Choose "First" in the "If multiple matches found take ID from" radio button.


Map your fields: map id_1 to "Account ID"
and map id_2 to "Account name".


Press on "Apply" - a new integration line will now appear and you will be able to edit / clone / add a child object under it or delete it using the icons on the right.
Press on "Apply" again. and save the form.

9-  Now drag the "Composer" element (from the "Elements" panel > Salesforce category)


In the element properties press on the "Mapping" button (Properties panel > Element  tab > Settings > Basic)
Set your mapping:
- Press on "Add Page" icon to upload your pdf page.


- Press on the "Add element" icon to open the list of your form fields.


- Choose id_1 from the dropdown. It will appear ontop of your pdf. Drag it inside the editor and place it above the first underline space.
- Choose id_2 from the dropdown. Drag it inside the editor and place it above the second underline space



- Change the font size to 30


- Press "Apply" to save the PDF mapping.
- Save the form

10- 

You will now see the pdf on canvas and will need to set its zoom level.
Select the Composer element on canvas and press on the buttons in its settings to adjust the zoom
Save the form and your pdf will be displayed to the the form filler in the same zoom level.


11- 

Publish the form as URL to test it.


Add this string to the form URL : "?ftPDFProcessing=true" like this:
https://Your Sub Domain name.titanform.com/...366365552?ftPDFProcessing=true#/
12- Once the form is loaded you will see your PDF and the first account name and ID will be embedded in it. You will also be able to print this PDF using the print icon in the top right corner.
 Find out more about the Salesforce form builder
 
CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.