Managing any form with Renderable elements, Field group and Display suite

Little than a week ago, I committed Renderable elements which enables you to register any piece of build in your Drupal 7 installation and manage that through Field UI. It will make additional fields available of existing entities on the manage forms/display screens or you can for example register the contact form, webform or (let's go crazy) the exposed filter form of a view and rearrange the fields with Field UI. Essentialy, the idea is that you can rip out all elements which are nested, also those inside the vertical tab on the node edit form for instance.

How it works

Currently, only forms are supported, support for any kind of other non entity display is coming soon. Once you enable the module, you can go to admin/config/system/rel/config and enable the registration link on top of forms. Now go to any form in your installation and you'll see a 'Manage form display' link on top. Clicking on the link will make the form available to manage. An overview can be found at admin/config/system/rel. In case you're registering a non entity form, this build will be inserted as a bundle into a new entity that's exposed by the module. This way, we can profit from hook_field_extra_fields to register any kind of element. Tricky ? Sure. Cool, oh yeah!

Any kind of custom registration is exportable thanks to CTools as well.

The power

The idea from the module came after the initial proof of concepts while working on forms support for Display suite. Soon after, an issue appeared as well in the Field group issue queue to make field groups available in other contexts than entities and the ability to rip out the elements that are nested inside vertical tabs. Of course, anything can be done with form alter, but our goal was to make this possible through Field UI. Now, we don't want to force people Field group and/or DS, so we decided to create a separate project, which also means there are no dependencies. If offers a lot benefits and the possibilities you have now are huge:

  1. Install this as a stand alone module and it will make any element on the form available like the Save/Preview/Delete button, vertical tabs etc.
  2. Install Field group and you can take control of existing field groups or add new ones on say the contact form.
  3. Install Display suite and you can now select a template file to manage the layout of registered forms, like webform etc.

Both modules (rel and ds_forms) still need cleanup, but also a lot of testing, so please test as much edge cases as you can and report back into the issue queue!

This might all seem a bit cryptic, so, we've recorded a screencast showing you the power of Renderable elements together with Field group and Display suite on node, contact, webform and views exposed filter forms.


Submitted by Brian Puccio on October 15, 2011 - 15:06

Wow, this is pretty useful stuff, thanks for contributing and thanks for the screencast. Just reading the module page I didn't get as clear of an idea as to how powerful this was.

Submitted by George Papadongonas on October 15, 2011 - 18:09

This is amazing! DS has helped me a lot during the last months and I'm amazed how fast it's becoming even better.

Submitted by Adnan on October 17, 2011 - 10:54

I must say this is an upcoming revolution in the world of Drupal. It will be my must to use module in my projects just like CCK, VIEWS, PANELS, DS etc. great idea and nice work.

Submitted by mark west on October 18, 2011 - 16:56

another module ill be adding to my toolbelt then haha

Submitted by Justin Rascoe on October 20, 2011 - 06:12

You all never cease to amaze me. Truly awesome work. Such a great contribution to the community. Thanks for all you do.

Submitted by Shawn on December 10, 2011 - 06:39

I'm thinking about making the switch to Drupal. This is exactly what I'm looking for, Superb!

Submitted by Lars Bo Jensen on December 16, 2011 - 10:58

God, this is so cool! I was whining some, as Rel was all new, because it didn't quite work the way I hoped. Display Suite, however, sure did, and now, the Trinity of them and Field Group enables managing forms in a very cool way. I couldn't figure out how to show a user some fields and letting him edit only some of them. Now I got it. Thank you. Bless you. You are really improving Drupal substantially.

Submitted by David Bucknell on June 2, 2012 - 07:27

Really inspring. Thank you. Trying it out -- used Drush to install the modules, checked permissions, followed screencast, but didn't find the cool select all check box you used in the video. Had to select each element. Not that hard, just a pain. I guess it's in a dev?

Thank you for your thoughtful, excellent work.

You are here