Duplicated Group Example

I have created a Post Type "Engine" with a duplicated Custom Group "Metrics". The "Metrics" Custom Group has the following magic fields:

Label Name Type Can be duplicated
Displacement displacment Textbox No
Bore bore Textbox No
Stroke stroke Textbox No

I have also created an item in Post Type "Engine" with the "Metrics" Custom Group duplicated once – the first group is for English units and the second group is for Metric units – as follows:

Name Value
displacement "426 cu in"
bore "4.25 in"
stroke "3.75 in"
displacement "7.0 L"
bore "108.0 mm"
stroke "95.3 mm"

Let us access these fields using Magic Fields’ PHP functions as follows:

Textbox field named "displacement" in a duplicated group named "metrics"

get_count_group('metrics_displacement') returns: 2 (this is a duplicated group)
get("metrics_displacment") returns: 426 cu in
get_data("metrics_displacement",1,1,$post->ID) returns: Array
(
    [meta_id] => 3869
    [meta_value] => 426 cu in
    [type] => textbox
    [options] => Array
        (
            [evalueate] => 1
            [size] => 25
        )

    [description] => 
    [label] => Displacement
)
get(“metrics_displacement”)     evaluates to:     “426 cu in”
get("metrics_displacment",2) returns: 7.0 L
get_data("metrics_displacement",2,1,$post->ID) returns: Array
(
    [meta_id] => 3870
    [meta_value] => 7.0 L
    [type] => textbox
    [options] => Array
        (
            [evalueate] => 1
            [size] => 25
        )

    [description] => 
    [label] => Displacement
)
get(“metrics_displacement”,2)     evaluates to:     “7.0 L”