Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #20400
    MR MICHAEL BRIORDAN
    Participant

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

    Docs here

    #20403
    Long 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 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 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 BRIORDAN
    Participant

    Thanks!

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