Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have set up a webform and I wish to move the Submit button above or to the right of the form. Does anyone know of a way I can do this?
Thanks
Comments
Comment #1
quicksketchWe're handling this in #374678: New image_button component plus patch to support it as a feature. But if you want to move the submit button in the 2.x version of the module, you can do this by theming the Webform. See the THEMING.txt file.
Comment #2
beck22 CreditAttribution: beck22 commentedThanks for your help. I have added your patch 374678v3 - but I can't see any additional button components when I edit the form. I am pretty new to this so maybe there's something I haven't done to get this working?
I'm using Drupal 6.13 - webform module v.6.x-2.7.
I patched webform.module and also added the files image_button.inc and button.inc into the Webform module folder.
Any help would be appreciated.. (or maybe if someone could point me in the direction of more instructions on how to theme the form to move the submit button as theming.txt didn't really help!)
Thanks!
Comment #3
djalloway CreditAttribution: djalloway commentedIf you are indeed new to all of this, and all you need is the location moved.
Go with reading the THEMING.TXT file that quicksketch recommended.
It will be the easiest implementation for you.
Going down the whole 'patch' feature road with little experience can get tricky and will probably cause you more trouble then help.
Comment #4
beck22 CreditAttribution: beck22 commentedHi thanks for the tip. However I am really struggling with theming this form. I just want to move the Submit button to the top - would be great if someone could point me in the right direction here.
Thanks!
Comment #5
djalloway CreditAttribution: djalloway commented1. Copy the webform-form.tpl.php file from the webform module directory to your theme directory.
2. Open the new file after you have copied it and locate the following line of code
print drupal_render($form['submitted']);
3. Add this line directly above it
print drupal_render($form['submit']);
Enjoy the new location of your submit button.
Comment #6
beck22 CreditAttribution: beck22 commentedAh so simple once you know how! Everything where I want it to be now - thanks so much for your help.
Comment #7
djalloway CreditAttribution: djalloway commented