Home Forums Feature Requests Radio field, alphabetical order


Radio field, alphabetical order

  • Hi,

    I would like to suggest small change to radio field. When there are many values it’s hard to find to correct one, especially if added thru other option. So, it would be much easier for user to find it in an alphabetical order.

    I have modified the radio.php field to look like this.
    Add to line 44:
    ‘alpabetical_order’ => 0,

    Add to line 151:
    // aplhabetical order
    if( $field[‘alpabetical_order’] ){
    asort( $field[‘choices’] );

    Add to line 285:
    // alpabetical_order
    acf_render_field_setting( $field, array(
    ‘label’ => __(‘Alphabetic order’,’acf’),
    ‘instructions’ => ”,
    ‘name’ => ‘alpabetical_order’,
    ‘type’ => ‘true_false’,
    ‘ui’ => 1,
    ‘message’ => __(“Show values in alphabetic order”, ‘acf’)

    It would be nice to see this in next update, as it is small change that doesn’t change functionality.

    George form

    Ps.: Thanks for great work y’all have done on version 5!

  • You should make your suggestion by opening a new support ticket

    This can be done using an acf/load_field filter and then reorder the field choices. $field['choices']

  • Ok, thanks I just posted a ticket.

    I think this should be an option on field edit page, because lot of people don’t know how to edit theme or don’t know PHP.


Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Radio field, alphabetical order’ is closed to new replies.