Just updated to pro 5.7.10, still no solution?
Hi Bee,
I do know how the field works. What i meant was on this page it would be nice to have, the field type and how its written in the php code
array('type' => "true_false")
as a reference for developing. Most of the other field types are quite self explanatory, but this one, you can write it several ways…. 😉
Greets Gerhard
Has anyone a idea how to check the post type when using prepare field?
My form is generated in a shortcode, so using the global $post is not a option.
Hi, in now im late but maybe this helps someone else…
With ACF Pro you can try something like:
$fields = array();
$groups = acf_get_field_groups(array('post_type' => 'kontakte'));
foreach($groups as $group){
$fields[$group['title']] = $group;
$f = acf_get_fields($group['ID']);
foreach($f as $i){
$fields[$group['title']]['fields'][$i['name']] = $i;
$fields[$group['title']]['fields'][$i['name']]['value'] = get_field($i['key']);
}
}
Greets
Is your post type hierarchical?