[development] Fieldsets for profile variables

Mark Leicester mark.leicester at efurbishment.com
Sun May 27 21:43:00 UTC 2007


Hi Mike,

Yes, I've also found the need for the sort of thing you describe. I  
have a working implementation that allows the arbitrary grouping of  
fields into fieldsets, where those fieldsets may be assigned and  
weighted within any category including the account page itself. Like  
you I only allow a single level of fieldset. I use an extra table to  
group fields by a fieldset name in the same way that the current  
implementation groups by category names. My admin interface is  
incomplete as yet (clients were happy to have it configured manually  
and then left alone).

I've also added radio buttons to the available profile field types.

It sounds like we're more or less at the same place. Shall we compare  
notes?

Cheers,
Mark

On 27 May 2007, at 19:42, Mike Anon wrote:

> This was posted in the forums under Module Development at: http:// 
> drupal.org/node/146972  It has received no responses (so far).  If  
> it receives no responses here, as well, then I have the answers to  
> my questions.
>
> I wanted to attach a fairly large number of variables (fields) to  
> each user's profile, and the UI for displaying and updating  
> (editing) "that many" variables was not to my liking.
>
> At the moment (in 4.7, anyway), profile variables can be put into  
> "categories" (apologies to jaza and bdragon, but that is the  
> "official" description of the way that profile fields are divided  
> into separate and distinct groups). When a user profile is edited,  
> the various categories are displayed as links near the top of the  
> first edit screen, with the first edit screen focused on the  
> "account settings" category. Those with user administrative privs  
> can add additional profile fields and each field can (actually,  
> must) be placed within a category. I believe that there are no  
> restrictions on the number of profile fields or the number of  
> profile field categories, although I certainly haven't stress  
> tested it.
>
> The "edit user profile" UI currently loads a separate page for each  
> category. That separate page lists all of the profile fields  
> associated with that category, in the order specified by the normal  
> Drupal weight/alphabetization mechanism. There is no ability to  
> group the fields in a fieldset.
>
> I have a simple module that allows those with user adminsitrative  
> privs the ability to assign each profile field to not only a  
> category, but to a fieldset, as well.
>
> Would this capability interest anybody else? By that I mean is it  
> worth my time to spiff up the existing module I have so that it  
> becomes a contrib module? Like many, I don't want to go through the  
> effort if there is either no interest or, in the extreme, negative  
> interest.
>
> At the moment, the code can only handle a fieldset depth of one.  
> That is, only one level of fieldsets for each category. Of course,  
> each category can have unlimited fieldsets, but they remain at the  
> same level - one beneath the category. The design of the database  
> modification, however, leaves the door open for unlimited fieldset  
> depth (not that anybody would ever use more than 2 or 3 levels).
>
> In addition to someday allowing for unlimited fieldset depth, at  
> some point I can see adding a "report" node allowing for a screen  
> report to be generated with the contents of a given category/ 
> fieldset combination. Since users aren't nodes in 4.7, views can't  
> be used to generate a report of this nature.
>
> My discussion on #drupal and #drupal-support lead me to believe  
> that there is not much involved here which will be different for  
> 5.x, although I haven't looked into that myself, yet.
>
> So, the question is, does it make sense for me to put "yet another  
> profile extension module" in play? Translation: would you find this  
> capability to be useful?
>
> I believe that I have checked the existing profile modules and none  
> of them implement this functionality.
>
> Assuming this to be a useful thing for some people, would it make  
> more sense to fold this capbilitity into an existing profile  
> contrib module rather than create a separate contrib module?
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070527/2f6abd91/attachment.htm 


More information about the development mailing list