Hello,
I've noticed a bug with merge tags - not sure if you are aware or if someone can explain why this is not woking as it should.
I have a radio field labelled 'Item' with the field id 19
Usually to ouput this data as merge tags I would simply do this...
choice text {Item:19}
choice value {Item:19:value}
Simples. The above merge tags work.
But when using pre-render php, for example...
$products = get_field('item_information',$post->ID);
$items = array();
foreach($products as $product)
$items[] = array(
"text" => $product['order_description'],
"value" => $product['price_euro']
);
foreach($form["fields"] as &$field){
if($field["id"] == 19 ){
$field["choices"] = $items;
$field["label"] = get_the_title($post->ID);
}
}
return $form;
If I then use these merge tags...
choice text {Item:19}
choice value {Item:19:value}
They both output the value. Which is incorrect because the choice text should not the choice value.
Any ideas why this behaviour happens?
Thanks
Josh