For new contact and organization types, I am using field_group for multipage entry. This is because we have a large amount of entry fields for both types and this is easier on our users, who mostly will be maintaining a large number of these contacts. We are able to use multipage grouping with great results while adding a contact, however when we try doing this with an organization, the default "Name" field will simply not cooperate and stays outside of the multipage group. I tried looking at the modules included form.inc files to pin down the difference in the form creation but I need a nudge in the right direction. What could possibly create a situation where this works on Contacts but not Organizations?
Comment | File | Size | Author |
---|---|---|---|
#13 | redhen-field-grouping-1794948-12.patch | 613 bytes | jhoffmcd |
#7 | form-weight-7118768-7.patch | 1.31 KB | asherry |
#4 | form-weight-7118768-4.patch | 1.45 KB | asherry |
Comments
Comment #1
levelos CreditAttribution: levelos commentedRe-categorizing as a support request. We've never used a multi-page field group, so don't any specific to offer. Happy to leave this open in case someone else can help.
Comment #2
kevinquillen CreditAttribution: kevinquillen commentedThis problem persists even if you are not doing a multipage form.
Install RedHen Organizations, and add some fields from the Field UI. Enable Field Group module. Create a few groups of type Vertical Tab. Nest your new Fields in them, using each one. Then go to create an Organization. Everything is neatly organized in their respective tabs except the Name property.
The reason for this is in redhen_forms.inc line 20:
No matter what you do, "Name" is added in outside of anyones control and unable to be grouped or sorted. He is asking for it to be like Nodes, where 'Title' is a node specific field defined in its module, but still able to be sorted on the Manage Fields page of the admin. This effectively lets you leverage Field Groups to control the grouping and layout of your entry forms. I would say this is more of a bug than support, but that is your call.
I have moved Organization Name all over Manage Fields, and despite it being in the $form array on the add/edit page, it does not appear. "Name" always appears at the top of the form.
Comment #3
asherry CreditAttribution: asherry commentedIn the redhen_contact module, the field name is wrapped in a container. That allows you to change the weight. When I did the same for the redhen_org label field it worked the same way.
Both the redhen_org:label and the redhen_contact:name fields though, if their container does not have a #type attribute, they will get removed in line 958 of field_groups.module. I just simply added a #type => 'container'.
I made a patch that seems to work for me, and doesn't screw up any actual data saving.
Comment #4
asherry CreditAttribution: asherry commentedThis is actually a patch for both redhen_contact and redhen_org, should I make two patches and post them to issues for the right submodules?
Comment #5
asherry CreditAttribution: asherry commentedComment #6
nedjoUsing containers also has theming advantages.
Looks like some stray commenting out here. Or is there a reason to delete the #weight property?
Comment #7
asherry CreditAttribution: asherry commentedSorry about the comment. No, there is no benefit or reason to take out the #weight property, that's actually what I was verifying by commenting it out. I meant to uncomment it. It doesn't actually do anything by itself though, but I think it would be handy if anybody or any other module does a form_alter and adds elements to the ['name'] container.
Here is another patch.
Comment #8
levelos CreditAttribution: levelos commentedThanks asherry, committed.
Comment #12
jhoffmcd CreditAttribution: jhoffmcd commentedThis seems to have resurfaced again with an update to the latest version 7.x-1.12. A simple patch should fix it.
Comment #13
jhoffmcd CreditAttribution: jhoffmcd commentedHere's a patch for just the original problem, it's the same fix provided by asherry but without the Redhen contact form fix.
Comment #14
jhoffmcd CreditAttribution: jhoffmcd commentedComment #16
gcbThanks @jhoffmcd!
Comment #18
asherry CreditAttribution: asherry at Freeflow Digital commented