Setting up the HTTP POST Connector
The HTTP connector allows you to automatically forward submitted data to any remote script using either the standard HTTP POST or HTTP GET methods.
This connector is particularly useful in two different cases:
- You need to use a third party service that normally takes its inputs from a web form. Perhaps you’re replacing the form and need to maintain the existing process, or maybe you’re just adding another process to your work flow. FormAssembly.com will act as the “middle-man”, processing your form and delivering all its advanced features, and then forwarding the data to the remote script.
- You need to enforce some sort of validation on your form data that isn’t provided by FormAssembly. Using a custom built script, you could take the submitted data, check it against your own validation rules, and if needed, prevent the submission and redirect the respondent to the form with the appropriate error message.
The Connector List
The ‘Connectors’ tab shows the list of the available connectors for the selected form.
- To access the list, go to the “My Forms” tab and click on the form you need to set up. This opens the form properties panel on the right-hand side.
- Click on the “Connectors” tab.
- To setup your connector, click on “configure”.
Connector Setup and Authentication
First activate the connector by selecting either “Background” or “Interactive” from the “Run Mode” section.
- “Background” is the default mode, in which the form data is passed invisibly to the remote script. No errors from the remote script will be reported to the respondent and the respondent will be taken to the thank-you page or URL immediately after completing the form.
- “Interactive” mode will display the text of any errors encountered from the endpoint. If the remote script is slow, your respondents will experience a noticeable delay between hitting “submit” and seeing the “thank-you” page. “Interactive” mode will also create the formula alias %%TFA_POST%% containing the remote script’s response.
Next provide the address (URL) of the script that will process the data. If needed you can also enter a username and password (RFC 2617 Basic HTTP Authentication).
Field Mapping
The purpose of the field mapping process is to specify what information should be sent and how it should be identified.
The connector lists the fields present in your form with their default field name. You can edit the field names to match the names expected by your remote script. You can also enter additional fields with fixed values as needed.
Use of the HTTP POST option will submit your mapped data as if the data were from a webform containing the form fields defined in your mappings. The HTTP GET option will submit your mapped data as URL encoded key-value pairs such as:
http://www.google.com?q=Johnson
assuming your ‘Remote Script Url’ was ‘http://www.google.com’ and you had mapped the field ‘Last Name’ to a field name of ‘q’.
Handling of Response from the Remote Script.
Background Mode
When the connector’s mode is set to ‘Background’, the response from the remote script is simply recorded in the connector’s activity log.
Interactive Mode
When the mode is set to ‘Interactive’, the success of the remote script execution is determined by the HTTP Status code returned. At this time, HTTP 2xx codes (200 to 206) are considered success, and HTTP 4xx and 5xx are considered failures. Other status codes, such as 3xx redirects are ignored.
Upon failure, the response returned by the remote script is displayed in the error message section, above the form. If you have some control over the output of your remote script, make sure that the script outputs the desired error message as a single line of plain text. FormAssembly will strip out any html markup before rendering the message.
POST Response Alias
In interactive mode, the full content of the response (including any html markup) can be accessed with formulas using the alias %%TFA_POST%%.
The Connector Activity Log
The connector’s activity log is particularly useful to troubleshoot configuration problems with your connector. To access it, go to the “Connectors” tab for the desired form and click on the “view log” link.





