0

My issue is that using the field_group module will create field groups for the form and the node view. And I don't want to group fields for viewing, I just want to make the form neater.

Here's a failed attempt (seems to ignore the values from body and title fields): https://gist.github.com/9651054

closed as off-topic by mpdonadio Mar 21 '14 at 11:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – mpdonadio
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    That code is only altering the form, it would not alter the display. You must have something else altering the display, maybe you changed it in the 'Manage Display' UI? – leexonline Mar 19 '14 at 21:17
  • @leexonline I just want to change the form. I want the display to stay the same. – Capi Etheriel Mar 19 '14 at 21:19
  • 1
    Yes and what I was saying is that form_alter only alters the form, it cannot alter the display. I don't know how it's possible you grouped fields on display using this code. – leexonline Mar 19 '14 at 21:25
  • Oh, no, my code doesn't group fields. It's the field_group module that does it. And I'm avoiding it :) – Capi Etheriel Mar 19 '14 at 21:38
  • You are very confused I think. Your code certainly groups fields into the container 'formgrouper'. Your opening statement about field_group creating groups for the form and view is true except that you don't have to create groups on both, you can create them just for the form or just for the display. You can definitely use field_group and it's a great module. – leexonline Mar 19 '14 at 21:52
1

Found it. Turns out the array keys are very important. The first time around, I added the form fields to the fieldset without any keys. It started working just by adding the proper array keys to the fieldset, see the last revision.

Not the answer you're looking for? Browse other questions tagged or ask your own question.