{"action":"created","issue":{"url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/issues/2","repository_url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups","labels_url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/issues/2/comments","events_url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/issues/2/events","html_url":"https://github.com/locomo/acf-field-buddypress-groups/issues/2","id":130752942,"number":2,"title":"Can't display the content of field","user":{"login":"merksk8","id":7544144,"avatar_url":"https://avatars.githubusercontent.com/u/7544144?v=3","gravatar_id":"","url":"https://api.github.com/users/merksk8","html_url":"https://github.com/merksk8","followers_url":"https://api.github.com/users/merksk8/followers","following_url":"https://api.github.com/users/merksk8/following{/other_user}","gists_url":"https://api.github.com/users/merksk8/gists{/gist_id}","starred_url":"https://api.github.com/users/merksk8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merksk8/subscriptions","organizations_url":"https://api.github.com/users/merksk8/orgs","repos_url":"https://api.github.com/users/merksk8/repos","events_url":"https://api.github.com/users/merksk8/events{/privacy}","received_events_url":"https://api.github.com/users/merksk8/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-02T17:24:08Z","updated_at":"2016-02-09T09:16:22Z","closed_at":"2016-02-03T08:43:41Z","body":"Hi,\r\nWhen I include the code to see the information of fields from ACF it works, but when I do the same with the buddypress group field, it sends a number instead of the name of the group. For example if i choose the second group called ''Test Group'', the field sends ''2'' instead ''Test Group''.\r\nHow can I do this???\r\n\r\nI've tried this:\r\n<?php the_field($field_name, $post_id); ?>\r\nand this:\r\n<?php $field = get_field($field_name, $post_id, $format_value); ?>\r\nSame result.\r\n Already tried to explore the code of your plugin looking for answers but i'm new in PHP and HTML so can't find a solution myself. \r\n\r\nAnd another little question, I hope you don't mind me to ask, this is really not important but wanted to ask if you thought about doing same plugin but for WP user frontend?\r\nThanks for your time, and great plugin."},"comment":{"url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/issues/comments/181773400","html_url":"https://github.com/locomo/acf-field-buddypress-groups/issues/2#issuecomment-181773400","issue_url":"https://api.github.com/repos/locomo/acf-field-buddypress-groups/issues/2","id":181773400,"user":{"login":"merksk8","id":7544144,"avatar_url":"https://avatars.githubusercontent.com/u/7544144?v=3","gravatar_id":"","url":"https://api.github.com/users/merksk8","html_url":"https://github.com/merksk8","followers_url":"https://api.github.com/users/merksk8/followers","following_url":"https://api.github.com/users/merksk8/following{/other_user}","gists_url":"https://api.github.com/users/merksk8/gists{/gist_id}","starred_url":"https://api.github.com/users/merksk8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merksk8/subscriptions","organizations_url":"https://api.github.com/users/merksk8/orgs","repos_url":"https://api.github.com/users/merksk8/repos","events_url":"https://api.github.com/users/merksk8/events{/privacy}","received_events_url":"https://api.github.com/users/merksk8/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T09:16:22Z","updated_at":"2016-02-09T09:16:22Z","body":"well, how I said I'm new into this and can't really get it xD, but anyway maybe this helps a bit, I just want to help as I can!! If you don't like this or is really a disaster say it and i delete this comment haha.\r\nAs far as I can, maybe can be something like this?\r\n=== Inside the function create_options( $field )===\r\n`<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\r\n\t<td class=\"label\">\r\n\t\t<label><?php _e(\"Return Format\",'acf'); ?></label>\r\n\t</td>\r\n\t<td>\r\n\t\t<?php\r\n\r\n\t\tdo_action('acf/create_field', array(\r\n\t\t\t'type'\t=>\t'radio',\r\n\t\t\t'name'\t=>\t'fields['.$key.'][format]',\r\n\t\t\t'value'\t=>\t$field['format'],\r\n\t\t\t'choices'\t=>\tarray(\r\n\t\t\t\t1\t=>\t__(\"Group ID\",'acf'),\r\n\t\t\t\t0\t=>\t__(\"Group Object\",'acf'),\r\n\t\t\t\t2\t=>  __(\"Group slug\",'acf'),\r\n\t\t\t\t),\r\n\t\t\t'layout'\t=>\t'horizontal',\r\n\t\t));\r\n\r\n\t\t?>\r\n\t</td>\r\n</tr>`\r\n\r\n===================================================\r\nThen I looked the example in the taxonomy.php, the taxonomy field of ACF by default that shows the same option, return object or ID and says this\r\n\r\n=====default function format_value_for_api() for taxonomy field to use as a base ======\r\n`function format_value_for_api( $value, $post_id, $field ) {\r\n\t\t\r\n\t\t// bail early if no value\r\n\t\tif( empty($value) ) {\r\n\t\t\treturn $value;\r\n\t\t}\r\n\t\t// force value to array\r\n\t\t$value = acf_force_type_array( $value );\r\n\t\t// convert values to int\r\n\t\t$value = array_map('intval', $value);\r\n\t\t// load posts if needed\r\n\t\t**if( $field['return_format'] == 'object' ) {\t\r\n\t\t\t// get posts\r\n\t\t\t$value = $this->get_terms( $value, $field[\"taxonomy\"] );**\r\n\t\t}\r\n\t\t// convert back from array if neccessary\r\n\t\tif( $field['field_type'] == 'select' || $field['field_type'] == 'radio' ) {\t\r\n\t\t\t$value = array_shift($value);\t\r\n\t\t}\r\n\t\t// return\r\n\t\treturn $value;\r\n\t}\r\n`\r\nI'm stuck here, I don't know how to do it, I hope this helps a bit while I continue looking for a solution for v4!! I'll be checking answers but I don't need it right now =).\r\n\r\nHow I said, thanks anyway!!"}}