How to update clone-able fields value from fronend side.

Support MB Group How to update clone-able fields value from fronend side.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5268
    SaqibSaqib
    Participant

    Hi there,

    To fetch the single metabox value I use get_post_meta function and I can update the single metabox value using update_post_meta function. For the clone-able fields, I use rwmb_meta function to retrieve the values in an associative array.

    However, I need help with to add clone-able fields values from frontend side. Please, can you give me a hand?

    Thanks

    #5277
    Anh TranAnh Tran
    Keymaster

    You just need to format the data in an array for cloneable fields, like this:

    $values = array(
        'value 1',
        'value 2',
    );
    update_post_meta( $post_id, $field_id, $values );

    The value for each clone is the same as for non-cloneable field. You can read more info here:

    https://metabox.io/docs/how-post-meta-is-saved-in-the-database/

    #5285
    SaqibSaqib
    Participant

    Thanks for your help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to update clone-able fields value from fronend side.’ is closed to new replies.