Quantcast
Channel: Tagged with repeater - Plugin Support
Viewing all articles
Browse latest Browse all 160

Update Repeater

$
0
0

Hello,

I have repeater ("field_51b7a94e480ec") with 2 fields: - mypages (relationship type) - mytext (just text)

I want to update only "mytext" fields, not the fields inside relationship.

I use the following code: ` $field_key = "field_51b7a94e480ec"; $order_id = 19; $value = get_field( $field_key, $order_id );

foreach ( $value as $idx => $val ) { $value[$idx]['mytext'] = "hm..."; }

update_field( $field_key, $value, $order_id ); But this gives the following error:Catchable fatal error: Object of class WP_Post could not be converted to string in /wp-content/plugins/advanced-custom-fields/core/fields/relationship.php on line 682`

I'm not completely sure that I explain the situation correctly, so pls check attached images.

Does someone know what I'm doing wrong.. Thank you

(clear new wp.3.5.1, acf.4.1.5.1, repeater.1.0.1)


Viewing all articles
Browse latest Browse all 160

Trending Articles