Great module! I love it. I want to use it for a site which is already in production. I have got a lot of fields contained in a fieldset. on the module page you mention:
Fields within fieldsets cannot be arranged. But, the fieldset itself can be re-arranged.

Is it in the roadmap to make it posisble to arrange fields within fieldsets in the future?

Thanks!

Comments

richardp’s picture

Thanks for the compliment!

Honestly speaking, I do not have any plans to work on fields-within-fieldsets right now. I am trying to move toward a stable 1.0 release of arrange_fields, so I do not want to introduce any new features which would probably also introduce lots of new bugs.

Now, that isn't to say that I don't want to support them-- I do. It's just that the jquery logic is so darned complicated it gives me a headache just thinking about it. Right now, arrange_fields positions elements relative to a wrapper div I've placed around the entire form. In order to arrange fields within fieldsets, positions must be stored relative to the parent fieldset (not to mention, jquery .draggable() and .resizeable() functions must be attached to just those fields too). And of course you can have nested fieldsets.

Figuring out a way to elegantly store and understand positions of N-nested fieldsets and their field's positions is the stuff of my nightmares. :)

Of course, if anyone out there submits a patch or gives some pointers, I would be happy to look into it for the next version. That, and I would also like fieldsets to behave the "old" way in the next version, where they actually "push down" content below them when they open. This too would require lots and lots of javascript to work, though.

Thanks for checking out the module!
Richard

pvanerk’s picture

Thanks for your clear explanation. I will look if one of our developers can look at it and help you with it.

sam moore’s picture

subscribe

daneyuleb’s picture

+1 on fieldsets

(Also...kudos for the GREAT module--making my life much easier.)

dsrikanth’s picture

+1 subscribing..
fieldset pushing down the content below and nested fieldsets will be icing on the cake for this excellent module.

summit’s picture

Subscribing, +1 for fieldsets.
greetings, Martijn

colemanw’s picture

Fab module, the perfect companion to Webform CiviCRM Integration
+1 on fieldsets, and thanks for the work

colemanw’s picture

2 suggestions for making fieldsets work

  1. Lower their z-index and have them be absolutely positioned and resizeable. The upshot of this is that for all practical purposes they will no longer definitively "contain" anything, since their children will be absolutely positioned relative to the entire form, and could easily be dragged outside the boundaries of the fieldset. Other elements could of course also then be dragged inside the fieldset. This method should not be too burdensome on the module developer, while pretty much giving the expected results.
  2. Create a separate canvas for each fieldset i.e. at http://example.com/arrange-fields/webform/975/fieldset/1 and add a link to each fieldset's canvas from the main canvas

Personally I like option 1 because it's simple and let's you do pretty much anything without requiring much extra code to make it work.

richardp’s picture

Thanks for the suggestions. Option #1 is actually already possible in the way you are describing. Just click "add markup" and add a fieldset to the page. You can resize it, as well as lower the z-index (set it to background) so that you can place other elements on top. Of course, as you said, it is strictly for aesthetics reasons, because the fields aren't *actually* inside the fieldset.

colemanw’s picture

Title: Will there be support for fields in fieldsets in the future? » How to make fieldsets work
Version: 6.x-1.0-beta4 » 6.x-1.x-dev

Of course. Thanks for the tip.

shiraz dindar’s picture

subscribe

colemanw’s picture

So... I took your advice, and was able to make my form look quite nice (the form was also using the webform_civicrm module so contact info goes straight into our database). However, I was only able to do so because I know css and html. I had to add a style property to the fieldset to manually set the height, and of course create the legend markup. And since the point of this module is to make styling forms accessible for people who don't, I recommend the following:
Currently fieldsets are not resizeable, only their containers. Recommend adding the jquery resizeable property to fieldsets and not their surrounding div.
Add a button to create new fieldsets, allow user to define legend text in popup.
Thanks again for all your great work!

petednz’s picture

well that seems to answer my question - that it isn't there yet (and in my case would be the D7 version)

colemanw thanks for leading me down this track as looks like a great companion to your module. BTW your example of a nice form is passed its 'used by' date and so doesn't show off what is possible - any other links?

colemanw’s picture

Well, I've been thinking that 90+% of the time this module gets used just to put some fields inline (next to each other). And the whole jquery drag&drop thing seems like overkill for that. I'm wondering if a simpler "inline fields" module isn't in order (or maybe it's been done... that would be nice).

richardp’s picture

@colemanw, A while back I seem to remember seeing something similar, where you could define "columns" in your form, and then you assigned fields into those columns, effectively making them inline. I don't remember the name of the module, but I do recall it just wasn't very user friendly-- no drag&drop magic. Drag & drop might be overkill, but it sure does make a dramatic impression, especially to non-technical users.

Truth be told, my original wish for this module was to make it like Visual Studio, where you have a toolbar of components, and just drag them onto your form to build it. It's certainly possible (quicksketch made a simple version, if I recall correctly), but unfortunately making the end result actually produce a Webform or CCK content type is extremely complicated. Still, it's another module I've thought about making down the line.

richardp’s picture

-- Actually, I take back what I said about quicksketch making a "simple" version. It looks like it's grown since the last time I saw it: http://drupal.org/project/form_builder

richardp’s picture

Status: Active » Closed (works as designed)

Just tidying up. I've come to the conclusion that I just cannot do fields-within-fieldsets, not w/o much more work than I am able to put in. If anyone out there has a solution, please feel free to post.

Richard

summit’s picture