Save repeatable fields separately
-
I use your wunderfull CMB2 toolkit for a new project. I’m very happy with it. But now, I run into a problem with repeating fields.
I cannot handle repeating fields with some third plugins, because your repeating fields store multiple data in one custom field (in json format). This is a good idea for save multiple data, but it’s a problem for me, because I have situations in there I must have separate fields for all data.
My question is:
a) Is there an option to say: please store repeatable fields in separate custom fields? (Similar Advanced Custom Fields. ACF save the repeater field in a wp_postmeta table. Example repeater field = gallery and contains 2 sub fields called “image” and “description”:
// meta_key meta_value gallery 2 // number of rows gallery_0_image 6 // sub field value gallery_0_description "some text" // sub field value gallery_1_image 7 // sub field value gallery_1_description "some text" // sub field value
b) If a) is not possible, how can build and hook a callback function with this functionality?
On change of field X, get the the data of field X, modify the data and store the modified data in field Y.
Is this possible?
- The topic ‘Save repeatable fields separately’ is closed to new replies.