ft_api_create_blank_submission

This function creates a blank submission for any of your forms already configured in Form Tools and returns the unique submission ID. It's called like so:

<?php
$submission_id = ft_api_create_blank_submission($form_id);
?>

By default, the submission is NOT finalized - so it won't appear in the Form Tools UI. To make the submission finalized by default, pass a second parameter set to true.

<?php
$submission_id = ft_api_create_blank_submission($form_id, true);
?>

Lastly, if you need your new submission to contain default values, you can include a third parameter. This is a hash (associative array) of [database column name] => [value]. Note: you cannot set the default values for any of the system fields (submission ID, submission data, last modified date and IP address and is_finalized). To find the database column names, go to your Edit Form -> Database tab.

<?php
$default_values = array(
	"col_1" => "Bob",
	"col_2" => "Jenkins",
	"col_3" => "bob@jenkins.net"
);
$submission_id = ft_api_create_blank_submission($form_id, true, $default_values);
?>
Edit Page