You are here

public static function WebformRevisionsController::submission_form_alter in Config Entity Revisions 8

Same name and namespace in other branches
  1. 1.x modules/webform_revisions/src/Controller/WebformRevisionsController.php \Drupal\webform_revisions\Controller\WebformRevisionsController::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()

1 call to WebformRevisionsController::submission_form_alter()
webform_revisions_webform_submission_form_alter in modules/webform_revisions/webform_revisions.module
Perform alterations before a webform submission form is rendered.

File

modules/webform_revisions/src/Controller/WebformRevisionsController.php, line 54

Class

WebformRevisionsController
Controller to make library functions available to various consumers.

Namespace

Drupal\webform_revisions\Controller

Code

public static function submission_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
  $form['#entity_builders']['webform_revisions'] = '\\Drupal\\webform_revisions\\Controller\\WebformRevisionsController::entity_builder';
}