Save a pod with a yes/no field
-
I have created a CPT which has a Yes/No field. I am building a custom page where users can change this Yes/No field in bulk. I am trying to pass values to this field but nothing sticks. I have tried values 0 and 1 as integers and strings, also the strings “Yes” and “No”.
I am saving the posts like this:
$pod = pods( 'pod_cpt', $post_id ); $data = array( 'item_sold' => $boolean, 'row' => $row, ); $pod->save( $data );
The
row
field is being saved since it’s a text field, however theitem_sold
field is not.Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Save a pod with a yes/no field’ is closed to new replies.