Postponed
Project:
Vertical Tabs
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Jan 2009 at 08:06 UTC
Updated:
19 Mar 2011 at 20:30 UTC
Hi, thanks this is great stuff.
Can you please make the location module work as a vertical tab. In this way you can select your location from a gmap and input the location info.
The location module is one of the messiest forms and is really difficult to hide, but your module will make it look great.
Thanks for the CCK fieldsets
Comments
Comment #1
George2 commentedi also want to add that location cck fields don't show up inside as well - as well as echo the congrats - this is great for usability :)
Comment #2
socialnicheguru commentedI was hoping it would work too but it is not. Location does not show up.
Comment #3
quicksketchLocation module now shows up properly with #453898: Form elements without DIV wrapper excluded from tab pane, though we still don't support summary text describing what's inside the location field.
Comment #4
EvanDonovan commentedThe Location field still isn't showing up for me on 6.x-1.0-beta3. Is there something else I need to do?
Comment #5
quicksketchHmm, well I assumed it would work. I don't use location.module, any patches to fix its behavior would be appreciated.
Comment #6
duellj commentedI think I've pinpointed the problem. The location module formats its "fieldset" in the following way (trimmed down, of course):
With multiple inner "location_element" sets depending on how many locations the node has. The markup is then themed as a fieldset, and so is the location_element field type. So you can't detect the locations "fieldset" based on the type set in the form array. You could detect it by the #title, but seems like a hack (since you could potentially name other fieldsets Location).
Comment #7
duellj commentedIt turns out it's an easy solution. In a hook_form_alter(), change the location element to a fieldset:
You could, I suppose, include this in the vertical_tabs.module, but it seems out of place.
Comment #8
PeteS commentedFor others trying this, I seemed to be running into an issue where my module was weighted after vertical_tabs, and vertical_tabs needs to have a final run through the form after all fieldsets are set up (so it can add attributes, etc.)
So I imagine I could either lower the weight of my module, or, what I did, was just call the vertical tabs form alter again at the bottom of my form_alter:
vertical_tabs_form_alter($form, $form_state, $form_id);
Comment #9
socialnicheguru commentedyou could use the util module to change the weight of vertical tabs in your system too
Comment #10
dave reidCan we ask the locations module to just use $form['locations']['#type'] = 'fieldset'?
Comment #11
dave reidIt actually looks like the latest code from location.module uses:
so this should work just fine now.
Comment #13
stefan81 commentederm...
I have the latest location and vertical tabs module installed, but I still can't select the location to insert it into the tabs...
any idea what to do?
Comment #14
dave reidThis has to be fixed somehow in CCK or Location module. There's likely nothing that we can or should do to special case this. I don't think this will work with Drupal 7's natural vertical tabs support either.
Leaving this postponed for now.
Comment #15
dave reidComment #16
dyke it commentedit seems that if you select a max number of locations greater than 1 (on the content type edit page), it will add the locations fieldset to vertical tabs.
i'm using the form module, and once i changed the max number, the locations fieldset appeared on the form configuration page.
this seems to have something to do with the double fieldsets that the locations module uses when there are multiple locations.
Comment #17
ryan88 commentedThank you for clarifying this... I was racking my brain trying to figure out why 1 node had a location tab and another didn't.
For the future, it would be nice if it worked regardless.
Comment #18
jamesfk commented+1 - location appears in a vertical tab when more than 1 location is allowed, also agree it should be in one by default :)
Comment #19
klonosI recently filed this issue #859650: Move the 'Location' fieldset out of the default fields (a.k.a support Vertical Tabs & Vertical Tabs Default Tab) in the Location module's issue queue. Thought you should know.
PS: ...added a better title for this one as well. This will help people find the issue and might bring some attention to it after all ;)
Comment #20
jp.stacey commentedPing: if any Vertical Tabs maintainers, or fans, or UX experts, would like to register an opinion on #859650: Move the 'Location' fieldset out of the default fields (a.k.a support Vertical Tabs & Vertical Tabs Default Tab) then it would be much appreciated. There's also a rather clumsy hack there that you can implement in location.module to "fix" Location for Vertical Tabs, albeit ending up with a slightly more wordy UX.
Comment #21
kndrI 've attached patch for location module, which should solve this problem. Patch is based on pure CSS method. http://drupal.org/node/859650#comment-4233534 I think, that this issue refer to location module, not vertical tabs.