Drupal: adding declaration text above the submit button in a web form

Is there an easy way to modify the webform-form-tpl.php template to show the disclaimer text above the submit button in a Drupal web form? I can add text under the button, but I don’t know how to split the button with other elements in order to add text between them, that is:

[form-elements]
[disclaimer text]
[submit button]

Hooray!

+3
source share
3 answers

The easiest option, probably, is to insert text as an element of the markup form, using hook_form_alterthe form.

+4
source

This worked for me:

$form['actions']['submit']['#prefix'] = 'Disclaimer...';
+3
source

; . -, - , .

0
source

Source: https://habr.com/ru/post/1741256/


All Articles