We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14dead1 commit 541cd2eCopy full SHA for 541cd2e
templates/module/src/Form/form.php.twig
@@ -115,7 +115,7 @@ class {{ class_name }} extends FormBase {% endblock %}
115
public function submitForm(array &$form, FormStateInterface $form_state) {
116
// Display result.
117
foreach ($form_state->getValues() as $key => $value) {
118
- \Drupal::messenger()->addMessage($key . ': ' . $value{% if input.type == 'text_format' %}['value']{% endif %});
+ \Drupal::messenger()->addMessage($key . ': ' . ($key === 'text_format'?$value['value']:$value));
119
}
120
121
{% endblock %}
0 commit comments