Subgroup values in elementor

Support MB Group Subgroup values in elementor

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #35450
    YasmineYasmine
    Participant

    Hello, how do I use group values in Elementor pro in a different way to your standard table?

    For example, in my MB frontend submission, I ask for a description and a relevant link. I want to show this data as the description and next to it a button with the dynamic link they added.

    I tried to create a loop to do this, but could not get the sub-group metabox values. How do I do this?

    #35467
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can create a shortcode to display the subfield value on the frontend. Then you can insert the view/shortcode anywhere with the page builder. Refer to this documentation https://docs.metabox.io/extensions/meta-box-group/#outputing-group-with-page-builders

    #35510
    YasmineYasmine
    Participant

    Thank you - this is exactly what I needed.

    Just to clarify this application is possible - if I create shortcodes, can I ensure every group value is displayed together.

    For example if I have a group with sub-fields for a word and its definition, and I want to make one long list (like a glossary). One user can contribute up to 5 words, but the list will include all the words of multiple users.

    If I use a loop with using the shortcode, will it 1. Always match the subgroup values together? and 2. Can I use to display every value in custom order -eg take all those words from every user and reorder on one page - to achieve something like:

    A Word 2     Definition 2    (from user 2)
    B Word 8     Definition 8     (from user 4)
    C word 3     Definition 3     (from user 2)
    D word 1     Definition 1     (from user 1)
    E word 4     Definition 4     (from user 3)
    F word 5     Definition 5     (from user 4)
    #35569
    YasmineYasmine
    Participant

    Hi Long - just wanting to follow up on this, before I migrate all my fieldset over to a group..

    #35594
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If you use the frontend submission form to submit posts with the group field, the group and subfield values are associated with the post, not the user. And it is the custom code so you can output the value in any format you want.

    #35620
    YasmineYasmine
    Participant

    Great - so that means I just need to reference every post to get every value?

    #35625
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Yes, you can query to get posts then get the field value associated with the post by post ID

    rwmb_meta( 'field_id', '', $post_id );
    
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.