---
title: "Web-to-Anything: Secure Forms with FormAssembly"
url: "https://blog.beyondthecloud.dev/blog/web-to-anything"
author: "Adrian Durlak"
published: "2022-10-03"
updated: "2022-10-03"
tags: "fa, formassembly, salesforce, salesforce forms, web-to-anything"
---

# Web-to-Anything: Secure Forms with FormAssembly

By [Adrian Durlak](https://blog.beyondthecloud.dev/author/adrian-durlak.md), October 3, 2022

Hello! 

FormAssembly (FA) is an easy to use, powerful web form platform.

In this example we will use it to build a secure form. It will do the following:

* send a form to the email address realated to a Contact record in Salesforce
* make sure users verify their email address to access the form
* record the response back in Salesforce

There are a few steps we need to perform:

1. Create an FA Integration User in Salesforce
2. Get an FA account
3. Build FA forms
4. Build an FA workflow
5. Add a Salesforce Quick Action to trigger the workflow
6. Test the solution :>

## 1\. Create an FA Integration User in Salesforce

This one should be pretty straightforward, if you have any experience with Salesforce.  
In Salesforce, create a user with sufficient permissions to update the objects you are planning to work with.  
Save the user’s credentials.

## 2\. Get an FormAssembly account

Go to <https://www.formassembly.com/> and buy a license or get your trial account.  
Once you get your FA credentials, you are ready to go!

## 3\. Build forms

It is time to play around with the FormAssembly itself.  
For the sake of this example, we will build 3 forms:

* Request Verification Code
* Verify Email Form
* QA form

### Request Verification Code Form

Once you login to your account click the **+New Form** button in the navigation bar.  
Let’s go with the **Blank Form** option.

![Choose Form](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929192509.png)

You **will be presented with** the form builder. Play around with it! You can give your form a title, select a predefined theme or even build one on your own. Let’s add a few fields to the form:

* VerCode
* Email – make sure you set field type to Email
* ContactId
* First Name
* Last Name

![Request Code Full](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929205011.png)

Mark all the fields as hidden so the end user cannot see them:

![Request Code Initial](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929193828.png)

Adjust labels, layout, colors, or any final changes you want to do before saving the form.  
You can preview the form to check what it will look like for the user using the **Preview** button:

![Request Code Preview](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929194213.png)

Let’s now connect to Salesforce.  
Go to **Connectors** on the left bar. Under **Form Opened** click **Add connector** and choose **Salesforce (Prefill)**. Your connectors page should look like this:

![Request Code Connector](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929194727.png)

Click **Configure** on the connector to set up connection with Salesforce.  
Use credentials created in Step 1\. to add a connection.  
Make sure the connector is enabled.  
Click on the **Configure your first lookup** button, select Contact as Salesforce object.  
From fields list choose **Contact Id**, then go with **Equals** and **an unsafe query parameter**.  
For the fields mapping choose the following:

![Connector full](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929204845.png)

The VerCode formula will generate random 6 digits number, used as a Verification Code. You can adjust it as you please.  
Save your changes.

### Verify Email Address Form

It is time to build the second form.  
Create new form and add one input field. The label should ask user to enter the code. Style it as you wish. Your final form should look similar to the following:

![Verify Email](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929200315.png)

There is no need to add any connectors here.

### QA Form

It is time to build the last form. It will contain 3 sections.

* **Overview** section with prepopulated FirstName and LastName
* **General Information** with a few questions the end user can answer
* **ContactId** – hidden field

Feel free to play around with the fields format, validations etc. to discover all possibilities FA provides.

![QA Form](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929201512.png)

Let’s move to the connector part.  
Add Salesforce (Prefill) connector on Form Opened. Configure it so it looks like the following:

![Connector QA Form](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929201759.png)

## 4\. Build workflow

We are now ready to build our workflow and trigger it from Salesforce.  
Go to the FA Home Page and click the **New Workflow** button. You will be presented with the workflow builder:

![Workflow Initial](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929202613.png)

1. Let’s start with selecting the first form – Verify Email Address.
2. Add next step using the **+** button and choose **Email**:  
![Workflow Step1](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929202856.png)  
![Workflow Step1 Fields](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929202954.png)  
We need to configure a few things.  
Let’s use the formula editor for the **TO** field. Press the formula icon then choose Fields -> Form Name (in my case name is _Verify Email Address_) -> Email:  
![Formula Editor](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929203236.png)  
Fill out all the other fields.  
In your email content use merge fields to formulate the Verification Code email sent to the user. You can do it using the **Fields** dropdown.  
The final result should look like this:  
![Email Properties](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929203548.png)  
Save.
3. Add next step – Form. Choose the **Verify Email Form**.
4. Add next step – Conditional.  
For the **Conditions Met** part enter the following:  
![Workflow Conditions](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929204352.png)  
Make sure the _Equals Value_ is a merge field – the VerCode from the first form.
5. On the _Conditions Met_ side add new step – Form. Choose the QA Entry. Configure Prefill as following in order to map corresponding fields. This way, the FirstName and LastName will be autopopulated when the form is opened.  
![Workflow Mapping](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929205320.png)
6. Add next step – Connector. Select the following:  
Select form response action – QA Form  
Select Connector – Salesforce  
Click _Configure Connector_ and enter the following:  
![Workflow Connector](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929205805.png)
7. Add last step – Redirect to another page:  
Adjust the success page to your needs. I will go with the message: **The form has been submitted!**  
Save your workflow.
8. Click the **Share** button located in the top right corner of your workflow and copy the workflow url.  
For the sake of this example, let’s assume the url is: <https://qaformtest.net/hbynkL>

## 5\. Add Salesforce Quick Action

Crate a quick action on the Contact object. It should fire the flow that sends an email to the Contact’s email address.  
Make sure the email body contains the workflow url appended with the parameter created in step 3 (refId).

Example of final url:  
<https://qaformtest.net/hbynkL?refId=0032p00003MeyTwBBJ>

Where:

* <https://qaformtest.net/hbynkL> – workflow url
* refId – name of the parameter defined in step3
* 0032p00003MeyTwBBJ – salesforce ContactId

Add the quick action to Contact layout.

## 6\. Test the solution

Go to the record page of the Contact you want to use for testing and trigger quick action.

![Send Form Quick Action](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929211714.png)

Check email:

![Form Requested](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929211605.png)

After opening the link you should see the first form. Click the **Send Code** button:

![Send Code](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929211842.png)

![Enter Code](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929212233.png)

Check your email to get the code. Enter it in the form:

![Email Code](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929212632.png)

The last form should be displayed:

![QA Form Prefilled](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929212800.png)

Let’s fill out the information.

![QA Form Filled](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929212914.png)

Click **Submit**.

Voilà!

You will be presented with the Success screen:

![Form Submitted](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929213150.png)

Let’s hop back to Salesforce to see what happened there:

![Contact Updated](https://wordpress.beyondthecloud.dev/wp-content/uploads/2022/09/Pasted-image-20220929213239.png)

As you can see, the Contact record was updated with information provided in the form.

---

If you have any questions, feel free to ask in the comment section below. 🙂

Was it helpful? Check out our other great posts [here](https://beyondthecloud.dev/blog).
