This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
    
Form API¶
Form submissions¶
To manage form submissions created in the Form Builder, use FormSubmissionServiceInterface.
Getting form submissions¶
To get existing form submissions, use FormSubmissionServiceInterface::loadByContent() (which takes a ContentInfo object as parameter), or FormSubmissionServiceInterface::loadById().
| 1 |  | 
Through this object, you can get information about submissions, such as their total number, and submission contents.
| 1 2 3 4 5 6 7 8 9 |  | 
Creating form submissions¶
To create a form submission, use the FormSubmissionServiceInterface::create() method.
This method takes:
- the ContentInfoobject of the content item containing the form
- the language code
- the value of the field containing the form
- the array of form field values
| 1 2 3 4 5 6 7 8 9 10 11 12 13 |  | 
Deleting form submissions¶
You can delete a form submission by using the FormSubmissionServiceInterface::delete() method.
| 1 2 |  |