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 think we need to simplify this module a little bit. I would like to remove all the fieldset customizations and just make it an all-or-nothing approach by default for node forms and the content type forms.
By integrating with form_controller, we can allow users to add vertical tabs to any form they want and give them the interface to select which fieldsets to include/exclude in the vertical tabs. We could then offer this integration and flexibility in D7 as well in the future.
Comment | File | Size | Author |
---|---|---|---|
#6 | 644790-formcontroller-D6.patch | 17.36 KB | Dave Reid |
#5 | 644790-formcontroller-D6.patch | 17.34 KB | Dave Reid |
#4 | 644790-formcontroller-D6.patch | 17.02 KB | Dave Reid |
Comments
Comment #1
Dave ReidThis got the ok from dmitrig01, so I'm going to go ahead and rip out the custom form handling code going on and make it integration with form_controller.
Comment #2
dmitrig01 CreditAttribution: dmitrig01 commentedForm_controller is a 5.x module though...
Comment #3
Dave ReidThe current HEAD code is for Drupal 6. Just need to get tha_sun to create a dev release for it.
EDIT: It already has a release (http://drupal.org/node/637380), but just needs to be 'supported'.
Comment #4
Dave ReidInitial patch. With this we now just use one variable called 'vertical_tabs_forms' and all that's needed to add vertical tabs to a form is to add
$form['#pre_render'][] = 'vertical_tabs_form_pre_render';
.With this functionality anyone can add vertical tabs either using the now-public 6.x-2.x-dev version of form_controller or adding the following to their site's settings.php:
It will automatically vertical-tabify the node and content type forms unless you did something like:
Comment #5
Dave ReidNew patch should set proper FALSE value for node forms if user has not selected any tabs in previous versions.
Comment #6
Dave ReidOne more try with one that actually works.
Comment #7
Dave ReidChanges have been made to CVS: http://drupal.org/cvs?commit=297742.
If you want to control which forms and fieldsets are vertical-tabified you can now do this in your settings.php:
Also, if you enable the Form controller module you get a link above every form on your site to 'configure' the form. On that configure page are settings for vertical tabification.
Having the fieldset options in the content type were just too specific and hard to maintain and work correctly. This approach should ensure lots of flexibility for the module.
Comment #8
Dave ReidAlso, the preferred way of adding vertical tabs to your own module is instead of doing:
You now should do:
EDIT: You can now just include the pre_render in your form callback, not in a hook_form_alter if you want since pre_render runs after all hook_form_alters and all fieldsets should be included in the form.
Comment #9
BenK CreditAttribution: BenK commentedJust needed to keep track of this thread...
Comment #10
phpepe CreditAttribution: phpepe commentedInstalling the beta6 version a noticed that there is to way configure wich form / fieldset redered as "vertical tab" and all my form becomes "verticaltabized"..
Don't you think that trying to "simplify" the module, it become more complex ? (ie: i have to install an extra dev-module, etc.)
Comment #11
NiklasBr CreditAttribution: NiklasBr commentedYeah, I was a little disappointed as well. Question for the maintainer: Would you consider a patch to re-enable the admin interface again if someone submitted one?
In the Apple voice: There's a module for that.... :)
Comment #12
bobgeier CreditAttribution: bobgeier commentedHave to agree with PHPepe and NiklasBr. The prior functionality was simple and straightforward. I can see where this is the right choice for the future, with more complete integration with Forms module. In the short term it's a pain in the ass, especially given the -dev status of form controller and form module. Until those become fully integrated and stable, it would be nice to re-enable the easier interface.
Comment #13
markabur CreditAttribution: markabur commentedyeah, i have to agree as well... i just spent an hour trying to figure out why my taxonomy terms suddenly became hidden down in the vertical tabs area, and where the settings to control this went. the vertical tabs ui widget is ok and all, but what i liked best about the module was how easy it made customizing/simplifying the node form.
Comment #14
bobgeier CreditAttribution: bobgeier commentedAnother thing I've noticed is that the Forms module still has a lot of incompatibilities. For example, Forms disables the Content Profile's module form for CCK types. So with forms active, you can't make changes in how a Content Profile type behaves. This essentially means that the new version of Vertical Tabs is breaking existing sites. That's not a good practice for a non -dev version update.
Comment #15
Wolfgang Reszel CreditAttribution: Wolfgang Reszel commentedHow to use this with CCK groups? I’ve a group name 'group_view'. Using this for my_form_id does not work.
Comment #16
borfast CreditAttribution: borfast commentedI'd say this is critical, because existing sites are being broken by this update. This is not a -dev version, so some more stability is expected, I believe.
I add another vote to reverting back to the old functionality until Form is at least in beta.
EDIT: just to be clear, I think the general motivation for this change is good; I just don't think it was a good idea to break the old behavior like this.
Comment #17
alexharries CreditAttribution: alexharries commentedI have to say I agree 100% with borfast; while this is obviously a well-intentioned change to aim for a more D7-consistent interface, Vertical Tabs is only one part of the puzzle and, while the other modules aren't ready for production sites, this change being "forced" onto users is only causing problems where none existed before.
It's a great shame, because the module is excellent; unfortunately, I only popped on here to see if this issue had been resolved before I uninstalled the module, as my site can't go on with some fieldsets being vertical-tabbed, some not, and everything being in a disordered mess until the software's available to fix everything :(
Comment #18
Kiphaas7 CreditAttribution: Kiphaas7 commentedHave to agree as well; while it is not a bad thing to have this handled by another module, that other module should be stable and not highly experimental.
Comment #19
Dave ReidI'll say it again. The Form module is *not* required to configure these. I've put up documentation on how to control this from your site's settings.php file: http://drupal.org/handbook/modules/vertical-tabs.
Comment #20
borfast CreditAttribution: borfast commentedDave, I believe everyone understood that the Forms module is not a requirement - but that's not the point. The point is that the update is forcing some changes that break working sites. It doesn't matter if Forms is a requirement or not; what matters is that websites that were working stopped working.
I think the correct way to handle this would have been to bump up the major version number with a new -dev branch and make the change there.
Now, don't get me wrong, I am very grateful for your work on this module, as I'm sure everyone else is. And we're expressing our opinions here in the form of constructive criticism, because we believe there was a better way to do things. In the end, you're the module maintainer, so the decisions are up to you and if the rest of us don't like it, we can either uninstall your module or just accept the change.
Comment #21
grantkrugerI have to agree with borfast and many others in the following:
But... I also agree with them that there is a problem.
Sadly, I believe this module, to some degree, is now in a kind of limbo. I'm not a Drupal expert, but the way I see it, when it comes to using this module there are six options, and I felt it would be useful to lay them out, either to help you correct me, or to help me clarify the problem. Either way.
So we went from a working module that guys like me were blogging about and talking about at DUGs, to one that is not really workable and that many of us may be forced to consider dropping, for reasons of site stability and usability, or because our users say so. This is not pique, this is a hard decision forced on us. As has been suggested, it may be that the changes you made needed to either wait for a production-ready Form module, or to be applied only to the Drupal 7 version.
I do apologize for these negative comments. I sure hated writing them. I'm not trying to get you down or break your motivation. I want this module to go from strength to strength. You've done fantastic work here. I want very much for that to continue. However, this stream did not seem to be going anywhere, so I felt it may be useful, right or wrong, to just list the options and point out the weaknesses that I believe were introduced with the new version. I feel that at best it is not adhering to best practices, but really, to me this issue is a bug, not a feature request.
Again, my thanks for all your hard work and my apologies for my bluntness.
Comment #22
ManyNancy CreditAttribution: ManyNancy commentedI am so confused. Are we not supposed to use VT on production sites? Form module says not to use Form on production sites.
Comment #23
seehawk CreditAttribution: seehawk commentedIs there any chance that the integration with Form can be moved to a 6.x-2.x-dev version, with 6.x-1.0-beta8 (when it comes out) reverting to the UI that was available in beta5? I don't mean to sound like I'm piling on (grantkruger summed up my own feelings far more thoroughly and thoughtfully than I could have), but this change of direction is causing a lot of near-term problems for the sites that depend on it.
Comment #24
Dave ReidAs I said in #666036: Vertical Tabs no longer works on the front end?:
I'm locking this thread is it's fixed. If you have anything to say it can follow-up in #666036: Vertical Tabs no longer works on the front end?.