Dear Support,
i have a text_list
in my admin custom post type and i am trying to set the values using update_post_meta
.
this is my field:
array(
'id' => $prefix . 'address',
'type' => 'text_list',
'name' => esc_html__( 'Postal Address', 'nw' ),
'options' => array(
'address_1' => 'Address Line 1',
'address_2' => 'Address Line 2',
),
),
$prefix = 'pph-';
update_post_meta($applicantID, $prefix . "address", 'one');
i tried the above and it sets the value for both fields. address_1
and address_2
i also tried below with no avail
update_post_meta($applicantID, $prefix . "address[]", 'one');
update_post_meta($applicantID, $prefix . "address[address_1]", 'one');
thank you.