Active
Project:
Vertical Tabs
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2010 at 12:36 UTC
Updated:
14 Feb 2014 at 11:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
eelkeboezeman commentedsubscribe. looking for exactly this
Comment #2
jody lynnAttached is the js file I've been using to accomplish this. It needs a little more work to add a setting to activate this and to be rolled as a patch.
Comment #3
leenwebb commentedThanks so much for this code, Jody Lynn -- it's exactly what I needed!
Comment #4
torgormack commentedI am also looking to implement a Next/Previous feature for my forms.
Can you provide any additional help on how to implement your javascript - it would be very much appreciated.
Comment #5
bennos commentedsubscribe
Comment #6
rv0 commentedsubscribe
Comment #7
TimelessDomain commentedWould be ideal to have this at the top & the bottom of each tab (instead of just the bottom)
Comment #8
rv0 commentedIMHO it would be best to put the buttons next to the SAVE / PREVIEW / DELETE buttons on the node edit form
Comment #9
christiaan_ commented#2 Thanks Jody. It works well. I have very long forms and would like the user to be able to auto scroll to the top after selecting NEXT or PREVIOUS.
I added
$('html,body').animate({scrollTop: (0)}, 500);to your code, and added the whole lot to the end of the vertical_tabs.js file.
Find attached the modified version.
Comment #10
torgormack commentedStill hoping for some explanation/help on how to actually implement Jody Lynn's .js code!
Comment #11
sudhindracn commentedThanks a ton for this script, it works like charm.
Comment #12
zeryn commentedI'm sure you have moved on. But I'm replying for those that find this page later like I did.
To implement this I just added the javascript to the end of the vertical_tabs.js file found in the vertical_tabs module directory.
Comment #13
jody lynn@zeryn: You never want to hack a module. It breaks your upgrade path.
@zeryn, @torgormack:
Rename the file as a .js file (remove the .txt extension).
Place it in your theme's directory.
Add to the top of your theme's template.php:
Replace your_theme with the name of your theme (machine name like the name of its directory, not the human readable name)
Comment #14
mnapier commentedI wanted the previous and next button to live with the save, preview, delete buttons so here's what I came up with if anyone else is interested. I used some of the ground work already laid down in this post so credit where it's do.
In a custom module I altered the form of the node edit I wanted this feature on.
Replace "YOUR_MODULE" and "FORM_ID" with the name of your module and the id of the form to add the buttons to.
Created the following js file called vertical_steps.js in the new modules folder.
Handles everything I wanted so hopefully this helps someone else out.
Comment #15
fire-wolf commented#14 works almost perfectly in D7. But there is one bug. What happens if one or more ".vertical-tabs-panes fieldset" have another fieldsets in it? Then commands .hide().prev('fieldset').show() hides current active fieldset (main fieldset of wrapper) and sets "display:block" for last fieldset of previous ".vertical-tabs-panes fieldset" and wrapper stays hidden. So the activated tab appears as empty.
Comment #16
fire-wolf commentedAs I wrote in #14, there is problem if fieldset have fieldsets in it. Then show/hide procedure must be:
For Next button:
$(".field-group-tab:visible").hide().next().show();and for Previous button:$(".field-group-tab:visible").hide().prev().show();At last - all this works perfectly in D7! Thank you all for the script.
Comment #17
fire-wolf commentedSorry - status change wrong.
Comment #18
Amruta_dani commentedwhere to add #16 code?
Comment #19
fire-wolf commentedamy_dany, my two rows should replace 4th and 17th rows:
$(".vertical-tabs-panes fieldset:visible").hide().next('fieldset').show();
$(".vertical-tabs-panes fieldset:visible").hide().prev('fieldset').show();
in the vertical_steps.js from #14
Comment #20
Amruta_dani commentedI added these lines at appropriate places, but click on next button moves to 8th vertical tab as I have 10 vertical tabs in my registration page and most of the fields are mandatory and every time I click on next button verifies all vertical tab fields for emptiness. why it is not working for me?