createSubmission()
API v2.x
This function creates a new submission for any of your forms already configured in Form Tools and returns the unique submission ID. It's called like so:
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.
If you need your new submission to contain default values, you can include a third parameter. This is an 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 » Fields tab.