I would like to change the order of the set of groups that are displayed to a user. In my case, I'm working with Mailing List groups, and all five are set to "Public Pages" visibility. If they are shown on a profile using the "Group(s)" field, they come up in alphabetical order.

The same ordering default is exhibited on the Mailing List Subscription page, /civicrm/mailing/subscribe.

My goal here is to create a mailing list preferences profile that users would get to through a checksum placed in emails sent to them by CiviMail. In my case, the default alphabetized order creates an awkward presentation for how my organization wants to relate to our community.

I'm currently running CiviCRM version 4.5.4 on Drupal 7.

  • Can you let us know the CMS involved. I.e. if it is Drupal, then Webform_CiviCRM would provide what you need.
    – petednz - fuzion
    Apr 15, 2015 at 19:35
  • We're using Drupal 7. Have not set up webforms, but it sounds like you're saying that there is an elegant solution to be found there? Apr 15, 2015 at 20:15
  • @petednz want to turn that into a full answer? :)
    – Coleman
    Apr 15, 2015 at 23:08
  • Petednz and the rest of the community, I agree with Coleman, if this is the only answer to the question, then it would be helpful to others to show this as Answered. Also, tips you can provide about "how" Webform_CiviCRM solves this problem would be useful. Thanks! Apr 16, 2015 at 10:45
  • looks like x beat me to it/saved me the effort. still not sure why SE takes so long to update me about updates
    – petednz - fuzion
    Apr 16, 2015 at 20:46

3 Answers 3


To extend on peterdnz answer:

On drupal, you can install webform and webform_civicrm modules and build the form you want.

Once you have enabled civicrm on that form, you can choose the various fields existing in civicrm (first or last name, email... and groups)

For the list of groups, you can then chose which one(s) you want to display and in which order. You can even change the name of each group (on that form) without having to change the name of the group, so you can use shortcuts as you might call the group differently within the team and with your visitors.

It's fairly intuitive once you get into the logic of having to take the fields as available in civicrm and add them to the form (conceptually similar to profiles, but the interface is IMO clearer)

  • Beautiful – thank you for the responses, Xavier and Peterdnz. I'd up-vote this answer, but my reputation is only 6, as this is my first question :). We will get to work on installing webform in Drupal. Apr 16, 2015 at 13:47
  • Fair enough! I did not know that was part of the process. Wish I could "accept" both answers, since they are both excellent, though different, approaches. Apr 19, 2015 at 1:10

I agree that a Webform is the best solution if you are using Drupal, but to answer the exact question that was asked:

CiviCRM profiles do not currently have a UI to alter the display of groups on a form. Doing so would require a little bit of custom code.

  • If you are more comfortable with PHP, use hook_civicrm_buildForm to modify the options in that form element.
  • If you prefer javascript, use jQuery to modify the order of checkboxes.
  • If you simply need to hide some options, the easiest was is to use css to set display:none.

For anyone not using Drupal and relying on the standard /civicrm/mailing/subscribe page, you can also just add a number to the front of your group name to order them as you want. So

  • Event updates
  • General newsletter
  • Service news

becomes ...

  1. General newsletter
  2. Service news
  3. Event updates

No coding skills required! :)

Heather O.

  • Thanks, Heather O. This is a good "user" level workaround for those of us who are not up for the technical challenge of coding solutions. May 1, 2015 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.