ft_api_get_submission

The ft_api_get_submission() function does pretty much what you'd expect it to do: it retrieves all information about a form submission. Unlike many other API functions, this one is more for programmers. It returns a hash of information (where the keys are the database column names and the values are the actual values in the field, directly from the database) which you can use for whatever you need.

The function takes two parameters: form ID and submission ID. Both fields are required. Here's an example of how it's called, where the form ID is 2 and submission ID is 550.

<?php
$submission_info = ft_api_get_submission(2, 550);
?>

Now, assuming your form has database columns called first_name and last_name, you could access those values like so:

<?php
echo $submission_info["first_name"]; // first name!
echo $submission_info["last_name"]; // last name!
?>

Tip: to find out what the database columns are all named, log into Form Tools and go to the Edit Form ยป Database tab. There, look at the DB column name column. If you haven't already done so, you might want to click the "Smart Fill" button to rename all your database columns to the same values as you form fields. This can simplify working with the database directly since the column names will be more descriptive.

Edit Page