mecachisenros / cf-civicrm

Caldera Forms CiviCRM Integration
GNU Affero General Public License v3.0
30 stars 26 forks source link

Auto populate options derived from custom data fields are are not sorted by containing group #138

Closed agileware-fj closed 4 years ago

agileware-fj commented 4 years ago

Describe the bug When selecting auto populate source for "Select" type fields, the option sets derived from custom data fields do not appear to be sorted at all, let alone by their logical grouping in CiviCRM. It looks like they just show up in the order they're inserted into the database, or possibly the field's weight at best.

To Reproduce Steps to reproduce the behavior:

  1. Add a dropdown field
  2. Check on ‘Auto populate’
  3. Open the ‘Source’ drop-down
  4. The CiviCRM custom data options are in a whacky order, especially when you have multiple custom data groups

Expected behavior Options derived from custom data groups should be ordered by custom data group and then weight, and preferentially be grouped together using <optgroup>s, as the price set options are.

Screenshots

labels ungrouped and unsorted

Desktop (please complete the following information): Agileware ref CFC-40

mecachisenros commented 4 years ago

@agileware-fj sounds good.