Drupal: adding disclaimer text above the submit button in a webform
Is there an easy-ish way to modify the webform-form-tpl.php template to show disclaimer text above the submit button in a Drupal webform? I can add text below the button, but do not know how to split up the button from the other elements to add text开发者_如何学编程 between them, ie:
[form-elements]
[disclaimer text]
[submit button]
Cheers!
The easiest option is probably is insert the text as a markup form item using hook_form_alter
on the form.
This worked for me :
$form['actions']['submit']['#prefix'] = 'Disclaimer...';
This doesn't really belong in the theme layer; it's content. You can add the disclaimer as a markup component to the end of the webform and it should appear after the other webform components and before the submit button like you want.
精彩评论