Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • in reply to: Remove group action #41111
    vacdkvacdk
    Participant

    Remove

    in reply to: Remove group action #41110
    vacdkvacdk
    Participant

    Thanks for your reply, but I can't see how.?

    I have a group, and when I see it on the front-end, I can press the "remove" see pic.
    Then i Want to do and action when removing the group item.

    Remove

    in reply to: โœ…MB Relationships + MB Frontend Submission #40553
    vacdkvacdk
    Participant

    Please help as i can't get this to work.
    I have this ShortCode

    [mb_frontend_form id='product-fields, products-to-venue_relationships_to' post_fields='title,content' post_type="Product"]

    Product-fields is custom fields ID added to post->product
    products-to-venue is the relationship ID

    All is showing except the relationship field.

    I have al so tried:
    products_to_venue_relationships_to
    products-to-venue_to
    products_to_venue_to
    all in {}

    in reply to: Can't display values from relationship #37182
    vacdkvacdk
    Participant

    Didn't go well, nothing works ๐Ÿ™

    $terms  = get_terms( [
        'taxonomy'     => 'venues',
        'hide_empty'   => false,
        'relationship' => [
            'id' => 'venue_to_user',
            'to' => 1, // User-ID
        ],
    ] );
    foreach ( $terms as $term ) {
        print_r($term);
    }
    add_action( 'mb_relationships_init', 'your_prefix_function_name' );
    
    function your_prefix_function_name() {
        MB_Relationships_API::register( [
            'id'   => 'venue_to_user',
            'from' => [
                'object_type' => 'term',
                'taxonomy'    => 'venues',
                'meta_box'    => [
                    'title' => 'From title',
                ],
                'field'       => [
                    'name' => 'From label2',
                ],
            ],
            'to'   => [
                'object_type' => 'user',
                'post_type'   => 'post',
                'taxonomy'    => 'category',
                'meta_box'    => [
                    'title' => 'To title',
                ],
                'field'       => [
                    'name' => 'To label2',
                ],
            ],
        ] );
    }
    in reply to: Custom Model - Hook into object deletion #36937
    vacdkvacdk
    Participant

    +1 for this.

    in reply to: โœ…Show or Hide Fields Based On Role #36915
    vacdkvacdk
    Participant

    +1 for this
    It will make forms much easier to build

    in reply to: โœ…update_post_meta for cloneable group fields #36857
    vacdkvacdk
    Participant

    Is this the same if it's a cloneable group ? as I can't get it to work. :/
    where is it that I target the specified group field row in the foreach ?

    
    add_action("rwmb_frontend_after_process", function ($config, $post_id) {
            if ("ticket-addon" === $config["id"]) {
    
            $group_values = rwmb_meta( 'group_tapgyiu2mz', '', $post_id );
                if ( ! empty( $group_values ) ) {
                    foreach ( $group_values as $group_value ) {
                     $rank = isset( $group_value[ 'ticket_rank' ] ) ? $group_value[ 'ticket_rank' ] : '';
                     echo $rank; // Display sub-field value  
    
                     //$post_id = 123; <-- getting post ID from the add_action
                     $value = rwmb_meta( 'group_tapgyiu2mz', '', $post_id );
                     $value[0]['ticket_row_id'] = '1234';
                     rwmb_set_meta( $post_id, $field_id, $value );
                    }
                }
    
                die();
            }
        },
        10,
        2
    );
    
    in reply to: โœ…update_post_meta for cloneable group fields #36844
    vacdkvacdk
    Participant

    How do i Update just 1 field in a clonealbe group ?

    Right now i use this code ud output data after submission:

    $group_values = rwmb_meta( 'group_tapgyiu2mz', '', $post_id );
                if ( ! empty( $group_values ) ) {
                    foreach ( $group_values as $group_value ) {
                     $rank = isset( $group_value[ 'ticket_rank' ] ) ? $group_value[ 'ticket_rank' ] : '';
                     echo $rank; // Display sub-field value  
                    }
                }
    
                die();
    

    That works fine

    but then I want also to update a group field at the same time in the group.

    add_action( 'init', function() {
        $post_id = 123;
        $field_id = 'group_tapgyiu2mz';
        $value = [
            [
                'hidden_field' => '1234',
            ],
        ];
        rwmb_set_meta( $post_id, $field_id, $value );
    }, 99 );
    in reply to: โœ…Get fields after submission #36839
    vacdkvacdk
    Participant

    So i figured it out by define the post_id

    rwmb_meta( 'my_field_id', '', $post_id );

    in reply to: โœ…Create WooCommerce products on frontend #36837
    vacdkvacdk
    Participant

    Has this been made as a feature request ?

    in reply to: Author taxonomy / select output #33283
    vacdkvacdk
    Participant

    Okay, thank you,

    Wierd that content only can be displayed if they have posted a post, cause I add them as an author but they only become one after first post ?

    But then I have another issue. I have created some CPT, but if they post in these, the author count is not working.

    So MetaBox own CPT does not count as posts.

    in reply to: Author taxonomy / select output #33254
    vacdkvacdk
    Participant

    How can I do it without oxygen, I need a template to address the WordPress author page ??

    /author/name

    in reply to: Author taxonomy / select output #33231
    vacdkvacdk
    Participant

    Well, i don't thing the callback is the issue, as its doing the same with manual value and label.

    But here is the callback

    function get_certifikat( ) {
    
    $data=array();
    $certificats = get_terms('certifikat', array('hide_empty' => 0, 'parent' =>0));
    
    foreach($certificats as $certificat) {
         $data[$certificat->slug]=$certificat->name;
    }
    
    return $data;
    
    }
    in reply to: Author taxonomy / select output #33211
    vacdkvacdk
    Participant

    Here is a video showing..

    https://1drv.ms/v/s!Avet-jVvMtjmhBD80rGvPzYmWNXu?e=uZO71Q

    Code in views
    {% for item in author.user_select_certifikat %}
    {{ item.label }}
    {% endfor %}

    On page shortcode: [mbv name="certifikater"]

    Its displayed on the author page in wordpress.

    in reply to: Author taxonomy / select output #33196
    vacdkvacdk
    Participant

    Hi

    Thanks for your reply,

    Its not because the value from the term/select box is missing.

    The error will come if the author have yet not created a post in a cpt.

Viewing 15 posts - 1 through 15 (of 19 total)