Cloned group with file_advanced field type

Support MB Group Cloned group with file_advanced field type

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6148
    HazmiHazmi
    Participant

    Hi there,
    pls can you post me a way, how can i get "meta" data (name, path, ..) of file_advanced field type inside cloned group? I'm trying something like this, where 'media' is cloned group and 'mb_file' is a field type (file_advanced), but it didn't work:

    $group = rwmb_meta('media');
    foreach($group as $data){
        $files = rwmb_meta($data['mb_file']);
        foreach($files as $file){ echo $file['name']; }
    }
    #6157
    Anh TranAnh Tran
    Keymaster

    You can get file info with the helper function RWMB_File_Field::file_info( $file ), like this:

    $group = rwmb_meta('media');
    foreach($group as $data){
        $files = rwmb_meta($data['mb_file']);
        foreach($files as $file) {
            $file_data = RWMB_File_Field::file_info( $file );
            var_dump( $file_data );
        }
    }
    #6159
    HazmiHazmi
    Participant

    OK, thanks..

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Cloned group with file_advanced field type’ is closed to new replies.