With the increasing number of fields in our site, I find it harder and harder to locate existing fields when creating a new content type. This patch sorts the options array before handing it to the select list. Ultimately it might be nice to group existing fields by content types they are assigned to, even if they are doubling up.

CommentFileSizeAuthor
sort_existing_fields.patch658 bytesnicolash

Comments

nicolash’s picture

Uhm, nope...looks better, but doesn't work.

doc2@drupalfr.org’s picture

Is this patch supposed to solve my request? http://drupal.org/node/154490 (Screenshot included.)

Thank you.

Arsène

yched’s picture

@doc2 : the issue you mention seem completely unrelated

doc2@drupalfr.org’s picture

Sorry, I thought it was. I understand it better now. You can delete it including this post (I wish I could, this would avoid you to do it for me).

spencersundell’s picture

Thank you, @NicolasH!! This was driving me insane. I really don't understand why this was not part of the code from the very beginning. The default sort order makes zero sense and is unusable with anything more than a handful of fields.

Although I'm using D5.7, your patch helped me locate the correct line of code to modify. You saved me and my site's admin users from needless migraines.

In my case I opted to use natcasesort so that all names sort in alpha order regardless of the case of the label's letters.

cheers

karens’s picture

Status: Active » Fixed

Field name sorting was added into a recent commit.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.