Not sure if I've missed it and it's already implemented, but the capability to group fields by fieldset would be wonderful.
Otherwise great plugin, glad it's in active development.
Not sure if I've missed it and it's already implemented, but the capability to group fields by fieldset would be wonderful.
Otherwise great plugin, glad it's in active development.
Bump. This would allow me to use a variety of other jquery plugins to force a wizard type environment for forms (multi-step forms)
This would be incredibly useful, mainly for usability and style. Wouldn't necessarily need to be a fieldset per se (fieldset are probably better), but any kind of nested grouping of elements would be a major enhancement to an already vital plugin, Thanks!
Also, I've seen that jQuery plugin, and that'd solve/simplify your other requested feature for multi-step forms. --> http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx
8 Months old and ignored? *BUMP*
@dijitul.
Nothing has been ignored. We've been busy adding LOTS of new features and functionality to the plugin. Version 1.4 alone added several new features and capabilities.
Some of these other features are more requested or appeal to a wider group of users so those naturally get done first. Other features and requests get added as we can if we feel that they are a good fit for the product.
There's still a big to-do list so keep an eye out for new features. Development is ongoing and we're just at version 1.4 too.. there's much to come.
As a side note, if you really want fieldsets in your form, you can use the inline HTML fields to add the additional markup to accomplish it.
Inline HTML would be a simple solution except the parser closes the fieldset and does not allow the user to place form elements between two inline html elements as open/close.
Just adding my support for this feature request. Or at the very least the ability to stop the inline html from auto closing my tags.
I've implemented fieldsets several times before using the HTML blocks and didn't have any problems with tags auto-closing. I will test again and let you know what I come up with.
I just tested this on a new form in the latest Release Candidate version of Gravity Forms and it works perfectly. I didn't have any issues with the HTML tags being closed automatically. I tested in Firefox, Safari and Chrome on the Mac platform.
I created two simple fieldsets using 3 HTML blocks - one to open the first fieldset, a second to close fieldset 1 and open fieldset 2 and a third to close the fieldsets. One thing to remember, the HTML blocks themselves are contained in the main unordered list structure, so to break everything up properly, you have to add one more step to close the containing list first, then add the other markup and in a subsequent HTML block, re-open a new UL element, etc.
Here's the HTML content I added for the test form
First HTML block content
</li><!-- close the html field li -->
</ul><!-- close the list -->
<fieldset id="fieldset_1"><!-- open the first fieldset -->
<legend>Fieldset 1</legend>
<ul class="gform_fields"><!-- reopen the list -->
Put form fields for the first fieldset here...
Second HTML block content
</li><!-- close the html field li -->
</ul><!-- close the list -->
</fieldset><!-- close the first fieldset -->
<fieldset id="fieldset_2"><!-- open the second fieldset -->
<legend>Fieldset 2</legend>
<ul class="gform_fields"><!-- reopen the list -->
Put form fields for the second fieldset here...
Third HTML block content - includes some inline styles for the example
</li><!-- close the html field li -->
</ul><!-- close the list -->
</fieldset><!-- close the second fieldset -->
<style type="text/css">
fieldset {border:1px solid #ccc; padding:20px; margin-bottom:30px;}
fieldset legend {font-weight:bold; background:#fff; display:block; padding: 4px; border:1px solid #ccc; margin-top:-10px;}
</style>
You can see my test here... screenshot: http://rkt.gs/1o
and you can download the XML export of my test form here: Download Form
The immediate benefit of actual fieldsets is using it with the "Conditional Logic" behavior -- unless I'm missing something, there's no way to hide an entire section with just one "if another field is X". You have to apply the conditional to each field individually, right?
Couldn't you just have the "Section Break" field use correct HTML? Instead of faking a new section with another li
, have it instead start a fieldset
. Then, however you have it applying conditional logic (I'm guessing the field id? "field_id_xyz"?), put that identifier in the fieldset tag, so it will show/hide the entire block.
@ABT
The section breaks do use "correct HTML". They're simply what the name implies, section BREAKS and not intended to be groupings like fieldsets. There's no "faking" anything.
We may introduce fieldsets and/or other types of groupings in a future release but for now that's not something that's a part of the core functionality.
Yes, the section breaks can be used for conditional logic operations. If you want to employ actual fieldset elements in your form, you can use the HTML blocks to introduce the extra markup inline. I detailed how to do that earlier in this topic.
You could use the section breaks to hinge the conditional logic, add the new markup for the fieldsets in between the section breaks and if you didn't want the actual section break headers to show, then you could simply hide those with some custom CSS. All it takes is a little bit of creativity to get it done.
Sorry, I didn't mean to imply that it's not valid HTML, but rather that it's not semantic HTML, and is therefore "faking" a section. Just because it's visually separated doesn't make it a real section -- and a section is by definition a grouping; even Gravity Forms halfway behaves as such (see below). This also probably doesn't conform to the new Accessibility guidelines as well, as screen-readers don't have the appropriate structure to go by.
I did miss the fact that the conditional logic, if applied to a Section Break, does hide fields in that section (thus treating it as a group). However, using the fieldset trick you detailed earlier breaks the conditional hiding of the entire section. So in my case since I don't really care about fieldsets, existing functionality is good enough.
Yeah, again it's not intended to be a grouping, simply a heading to define the following set of fields. I think that point is missed here somewhere. Nonetheless, glad that you've got a working solution.
There's always room for improvement and we're constantly adding features as we go along so I'm sure we'll implement some kind of real field grouping as the plugin continues to evolve.