How to get Field's Title value rather than Field's name value of an ObjectBrick?


#1

Hi,

How can I get the Field’s Title value of an objectBrick? I’m able get the name value. I have an ObjectBrick as in the Image below.

I’m able to get the Field’s name value using below code. but how can I get the Title’s value. Please help

          <?php 
             $attrs = $product->getAttribut![03%20PM|516x116](upload://wTVLNx7oDNUtdVQZoORUz1NGkFa.png)es()->{'Attributes'};
             foreach($attrs as $key=>$value): 
             if($key != 'type' && $key != 'fieldname' && $key != 'doDelete' && $key != 'object' && $value != '') :
           ?>
             
             <span><?= $key." : ".$value?></span><br>
           <?php 
             endif; 
             endforeach; ?>

image

I need to get the Title value. In this case I need to display titles Bulb Base, Bulb Shape etc.