Fieldset Text

Support MB Builder Fieldset TextResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20398
    MR MICHAEL BRIORDANMR MICHAEL BRIORDAN
    Participant

    Hi,

    Thanks for your help.

    In trying to refine my design. Having problems with fieldset text. If I have read the docs right, this provides a set of multiple related records per record, like this

    From https://docs.metabox.io/fields/fieldset-text/

    But this is not what I'm getting. Here's my input on the edit fields group form:

    From Edit Field Group

    And here is how it is displaying in https://www.michaelriordan.co.uk/wholeprophesie/wp-admin/post-new.php?post_type=edition>Editions | Add New.<br />

    From Editions | Add New

    I thought fieldset-text should allow me to add multiple rows. Is this possible?

    #20400
    MR MICHAEL BRIORDANMR MICHAEL BRIORDAN
    Participant

    I've worked this out myself. For benefit of others, make the field cloneable.

    Docs here

    #20403
    Long NguyenLong Nguyen
    Moderator

    Hi,

    In the Builder, you can make a field cloneable by checking the option Cloneable, see my screenshot https://share.getcloudapp.com/o0uv8lKg.

    #20414
    MR MICHAEL BRIORDANMR MICHAEL BRIORDAN
    Participant

    Thank you. This works. However, I can't now work out how to get this working in MB Views, using Twig. What I have so far:

    {% for item in post.fieldsetcopies %}
        {% if item.libplace %}
            {{ item.libplace }},
        {% endif %}
        {% if item.lib %}
           {{ item.lib }},
        {% endif %}
        {% if item.libshelf %}
           . Shelkmark: {{ item.libshelf }},
        {% endif %}
        <!-- etc -->
    {% endfor %}

    My 'inputs' (subfields) are not appearing on the list of fields in views.

    I've also experimented with for loops on each sub-field in the fieldset.

    #20415
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please try to use the function get_post_meta with the proxy mb., I'm going to check the issue with the fieldset field and let you know later.

    {% set fieldset = mb.get_post_meta( post.ID, 'fieldsetcopies', true ) %}
    {% for item in fieldset %}
        {{ item.libplace }}
    {% endfor %}
    #20466
    MR MICHAEL BRIORDANMR MICHAEL BRIORDAN
    Participant

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.