tlovett1/custom-contact-forms — pull request #7 by philipashlock (2013-12-17 23:35:31+00:00)
Title: Adds fieldsets as a new form object

This is really helpful for grouping form fields into different sections - *especially* for applying CSS and implementing more sophisticated layouts for complex forms.

The way I've implemented this isn't the most intuitive because it repurposes the functionality for input fields, but I think it's perfectly acceptable as is. When you add a Fieldset object it will wrap every field after it in a ``

`` tag. The tag will close either when it gets to another fieldset or when all the other fields have been added. The "Field Label" is used to populate a ``
`` tag at the beginning of the fieldset.

On the database, I think it works fine to repurpose fields like this, but in the admin UI for the plugin, it would be better if this was separate from the actual fields meant for user input.

Right now many of the fields are ignored like maxlength and "required field" and others are used slightly differently, eg "Field Label" is actually "Legend" which is different albeit conceptually very similar.