Support » Plugin: Advanced Custom Fields » Feature Request – Array data for select and radios

  • Hi!

    Can you include an option to use an array as data source for select fields and other multiple choices?

    Instead of type in the values for options, can you create a field where i type the name of a custom function that returns an array with data, and use the function as source for the field (select)?

    e.g:

    //in functions.php
    
    function my_custom_data()
    {
    return array(
    array('label'=>'my_label_1', 'value', 'my_value_1' ),
    array('label'=>'my_label_2', 'value', 'my_value_2' ),
    );
    }

    Type: Select
    Data: my_custom_data

    thank you!

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  • The topic ‘Feature Request – Array data for select and radios’ is closed to new replies.