- This topic has 1 reply, 2 voices, and was last updated 2 years, 4 months ago by .
-
Topic
-
Dear Support,
i have a
text_list
in my admin custom post type and i am trying to set the values usingupdate_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
andaddress_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.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.