public static function WebformSubmissionForm::submitFormValues in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::submitFormValues()
Programmatically validate form values and submit a webform submission.
Parameters
array $values: An array of submission form values and data.
bool $validate_only: Flag to trigger only webform validation. Defaults to FALSE.
Return value
array|\Drupal\webform\WebformSubmissionInterface|null An array of error messages if validation fails or a webform submission (when $validate_only is FALSE) or NULL (when $validate_only is TRUE) if there are no validation errors.
4 calls to WebformSubmissionForm::submitFormValues()
- WebformDevelSubmissionApiForm::submitForm in modules/
webform_devel/ src/ Form/ WebformDevelSubmissionApiForm.php - Form submission handler.
- WebformSettingsRemoteAddrTest::testRemoteAddr in tests/
src/ Functional/ Settings/ WebformSettingsRemoteAddrTest.php - Tests webform disable remote IP address.
- WebformSubmissionApiTest::testApi in tests/
src/ Functional/ WebformSubmissionApiTest.php - Test webform API.
- WebformSubmissionForm::validateFormValues in src/
WebformSubmissionForm.php - Programmatically validate form values and submit a webform submission.
File
- src/
WebformSubmissionForm.php, line 3199
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
public static function submitFormValues(array $values, $validate_only = FALSE) {
$webform_submission = WebformSubmission::create($values);
return static::submitWebformSubmission($webform_submission, $validate_only);
}