public function WebformSubmissionForm::getFormId in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::getFormId()
Returns a unique string identifying the form.
The returned ID should be a unique string that can be a valid PHP function name, since it's used in hook implementation names such as hook_form_FORM_ID_alter().
Return value
string The unique string identifying the form.
Overrides EntityForm::getFormId
1 call to WebformSubmissionForm::getFormId()
- WebformSubmissionForm::buildForm in src/
WebformSubmissionForm.php - Form constructor.
File
- src/
WebformSubmissionForm.php, line 319
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
public function getFormId() {
$form_id = $this->entity
->getEntityTypeId();
$form_id .= '_' . $this->entity
->bundle();
if ($source_entity = $this->entity
->getSourceEntity()) {
$form_id .= '_' . $source_entity
->getEntityTypeId() . '_' . $source_entity
->id();
}
if ($this->operation !== 'default') {
$form_id .= '_' . $this->operation;
}
return $form_id . '_form';
}