You are here

function hook_webform_submission_form_alter in Webform 8.5

Same name and namespace in other branches
  1. 6.x webform.api.php \hook_webform_submission_form_alter()

Perform alterations before a webform submission form is rendered.

This hook is identical to hook_form_alter() but allows the hook_webform_submission_form_alter() function to be stored in a dedicated include file and it also allows the Webform module to implement webform alter logic on another module's behalf.

Parameters

array $form: Nested array of form elements that comprise the webform.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. The arguments that \Drupal::formBuilder()->getForm() was originally called with are available in the array $form_state->getBuildInfo()['args'].

string $form_id: String representing the webform's id.

See also

webform.honeypot.inc

hook_form_BASE_FORM_ID_alter()

hook_form_FORM_ID_alter()

11 functions implement hook_webform_submission_form_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

antibot_webform_submission_form_alter in third_party_settings/webform.antibot.inc
Implements hook_webform_submission_form_alter().
captcha_webform_submission_form_alter in third_party_settings/webform.captcha.inc
Implements hook_webform_submission_form_alter().
honeypot_webform_submission_form_alter in third_party_settings/webform.honeypot.inc
Implements hook_webform_submission_form_alter().
maillog_webform_submission_form_alter in third_party_settings/webform.maillog.inc
Implements hook_webform_submission_form_alter().
webform_bootstrap_test_module_webform_submission_form_alter in modules/webform_bootstrap/tests/modules/webform_bootstrap_test_module/webform_bootstrap_test_module.inc
Implements hook_webform_submission_form_alter().

... See full list

1 invocation of hook_webform_submission_form_alter()
WebformSubmissionForm::buildForm in src/WebformSubmissionForm.php
Form constructor.

File

./webform.api.php, line 377
Hooks related to Webform module.

Code

function hook_webform_submission_form_alter(array &$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
}