You are here

public function FormState::valueByKey in Little helpers 7

1 call to FormState::valueByKey()
FormState::valuesByKeys in src/Webform/FormState.php

File

src/Webform/FormState.php, line 46

Class

FormState
Class for making webform component values before an submission is saved.

Namespace

Drupal\little_helpers\Webform

Code

public function valueByKey($form_key) {
  if ($component = $this->webform
    ->componentByKey($form_key)) {
    return $this
      ->valueByCid($component['cid']);
  }
}