Support

Account

Home Forums Add-ons Repeater Field Show select field label within nested repeater Reply To: Show select field label within nested repeater

  • Hi @elliot,

    Thank you for replying. I should point out that my PHP knowledge isn’t that great(!). I did however get the following output:

    Array
    (
        [field_51e6a66b8509b] => Array
            (
                [label] => Client name
                [name] => client_name
                [type] => text
                [instructions] => 
                [column_width] => 
                [default_value] => 
                [formatting] => html
                [order_no] => 0
                [key] => field_51e6a66b8509b
            )
    
        [field_51e6a6788509c] => Array
            (
                [label] => Client logo
                [name] => client_logo
                [type] => image
                [instructions] => 
                [column_width] => 
                [save_format] => url
                [preview_size] => thumbnail
                [order_no] => 1
                [key] => field_51e6a6788509c
            )
    
        [field_51e6a6878509d] => Array
            (
                [label] => Images
                [name] => images
                [type] => repeater
                [instructions] => 
                [column_width] => 
                [sub_fields] => Array
                    (
                        [field_51e6a69f8509e] => Array
                            (
                                [label] => Large image
                                [name] => large_image
                                [type] => image
                                [instructions] => 
                                [column_width] => 
                                [save_format] => url
                                [preview_size] => thumbnail
                                [order_no] => 0
                                [key] => field_51e6a69f8509e
                            )
    
                        [field_51e9070105abe] => Array
                            (
                                [choices] => Array
                                    (
                                        [kitchen] => Kitchen
                                        [lounge] => Lounge
                                        [hallway] => Hallway
                                        [meeting_room] => Meeting Room
                                        [bathroom] => Bathroom
                                        [reception] => Reception
                                        [bedroom] => bedroom
                                    )
    
                                [label] => Location
                                [name] => location
                                [type] => select
                                [instructions] => 
                                [column_width] => 
                                [default_value] => 
                                [allow_null] => 0
                                [multiple] => 0
                                [order_no] => 1
                                [key] => field_51e9070105abe
                            )
    
                    )
    
                [row_min] => 0
                [row_limit] => 
                [layout] => table
                [button_label] => Add Row
                [order_no] => 2
                [key] => field_51e6a6878509d
            )
    
    )

    What I basically want is to output the ‘choices’ array from the above. I’ve taken a look into multidimensional arrays and understand them (ish!), but not when they’re this deep. Do you know how I can output the ‘choices’?

    Thanks again