Custom Fields
Re-Envisioned
Support Meta Box Group How to update clone-able fields value from fronend side.

  • Creator
    Topic
  • #5268
    Saqib
    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #5277
    Anh 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
    Saqib
    Participant

    Thanks for your help.

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