Skip to main content

Custom Field Groups/Objects

Comments

7 comments

  • Sandra Prunici

    Hi,

    Thank you for all these details and screenshots!

    Could you please check if you added the right location for the ACF you created? If you want to attach the ACF to the CPT you created, could you please check this aspect? I create an ACF "Test" and a CPT "Car". Therefore, I added in the Location "Post Type is equal to Car". See here. After creating the CPT https://jmp.sh/qjm277g, did you create the template for this CPT? What display condition did you set fro the template? For example in my case, I selected the "Include - Cars - All". See here. After this, when I start editing the template with Brizy in the Text element when I added #name_cars, then it appears in the predefined list. See here. Could you please check if you added the right ACF location and the right Brizy template display condition?

    Do you have installed and activated the Brizy Free plugin too? Could you please update Brizy Free and Brizy Pro to our latest versions? Brizy Free 2.1.5 and Brizy Pro 2.1.3.

    Thanks!

    Best regards,
    Sandra

    1
  • Matthew Teng

    Hi,

    Thanks for the response! I did set the ACF to the corresponding CPT as you can see below: 


    After I created the CPT, I did create a template, with the display condition: 

     


    I haven't had an issue if I am just trying to access a "Text" or "Image" type in my template, but I'm running into this issue when I try to set the type of my field to "Group" (on the right hand side of the image), and try to access the children of this group, like below.  



    For instance, I created another field onto my field group called "Test" that had a field type of "Text", and was able to access that in the template. 

    But, nothing shows up when I try to access my fields from this ACF that have the type of "Group". I have both versions of Brizy installed currently, and have updated them. Not too sure why this is the case after updating either.

    Thanks again!

    0
  • Sandra Prunici

    Hi,

    Thank you for all these details. Now, I could understand what you created. Unfortunately, the Group field is from the "Layout" section and Brizy doesn't have a similar element and can't "understand" it. When you create an ACF, you already create a group of the custom field and now you have a group in a group and at the moment, Brizy can't read such data. We recommend using other fields to be able to insert then in the template, anyway you wanted to display them separately.

    Thank you!

    Best regards,
    Sandra

    1
  • Matthew Teng

    Ah I see, thanks for answering! 

    I have not tried alternatives to this yet, but would this be the case if I wanted to create a custom field NOT through ACF and I wanted this custom field to contain a JSON object or an array of text fields/images/etc. and tried to access these objects through Brizy template? Or would I possibly run into the same issue as described above?


    0
  • Sandra Prunici

    Hi,

    Unfortunately but this will not work in the Brizy template (JSON object and array) because will be difficult to display them because isn't available the same element in the Brizy too and to activate the dynamic content for them. When you set the text in the ACF or CPT, you can display it in the Brizy because we have the Text element and it has the possibility to activate the Dynamic content. The same with other fields but in Brizy isn't available the element with dynamic content will display the JSON object or an array. For array, you can follow the suggestion I said above (in case the array isn't complex). You can add as text fields the headings of the array and using the table element from Brizy to display them. Similar to here.

    Thanks!

    Best regards,
    Sandra

    1
  • Matthew Teng

    Gotcha, thank you!

    0
  • Sandra Prunici

    Thank you too!

    Stay safe and have a great day,
    Sandra

    0

Please sign in to leave a comment.