Is there a way to move the submit button for a bulk operation to the top of the form in the same fieldset where the options are selected? Many of my users would rather have the button at the top instead of the bottom. Or alternatively can the button be available in both locations?
The option for Display operations as "Each action as a separate button" is not an option for me as the field in question are cck fields
Comments
Comment #1
arvinsingla commentedSo I've almost solved my problem completely after posting this. Realized I could use a hook_form_alter to copy the submit button and change the weight so I would have a second submit button at the top of the list. Did some brief testing and everything seems to work.
Here's my hook for anyone interested
The only thing I'm not sure about is how to put the submit button inside the table element where the select list options are. Any ideas?
Comment #2
infojunkieDo you mean the submit button for the case of one action only?
Comment #3
mstef commented+1
Comment #4
Exploratus commentedSubsribe
Comment #5
infojunkiefixed in the latest dev.
Comment #7
xcafebabe commentedAnd if I want to move the submit button for a bulk operation to the bottom of the page? Solution proposed in #1 didn't work for me . Any suggestion?
Comment #8
sandu.camerzan commentedFor Drupal 7 the following code worked for me - VBO operations displayed as buttons, at bottom of the output table:
Comment #9
smurfxx commentedSorry for the question but where do I have to put the code of #8?
Comment #10
paulihuhtiniemi commentedTested form alter in #8 with 3.2 version, doesn't seem to help :/
Comment #11
sirnjeet commentedSorry, posted to wrong thread. Comment deleted.
Comment #12
bisonbleu commentedRan into this issue. Code in #8 works perfectly. Thanks @sandu.camerzan!
I used the more specific hook_form_FORM_ID_alter() in an existing custom module.
I'm using Views 7.x-3.8 and VBO 7.x-3.2 in a Drupal 7.32 install.
Comment #13
bisonbleu commentedUpdated the title to reflect sub-issue.
Comment #14
Collins405 commentedJeez this is annoying, spent ages trying to push the submit form down, didnt think about raising the output! (face palm)
Thanks!
Comment #15
kopeboythis and #2410873: Moving the operations block to the bottom of the page (for every vbo form) work.
Keep in mind you cant use form_alter function twice in the same module.
Comment #16
rfletcher73 commentedwhy isn't the submit button one of the elements in the form? I would love that! Then i can make a custom layout and put the field in the first region and the submit button in the second region.