Custom Fields
Re-Envisioned
Support General save Text List field using update post meta Reply To: save Text List field using update post meta

#11748

Anh Tran
Keymaster

Hello,

text_list save data in multiple rows in the database. So, using update_post_meta might removes all existing values.

I’d suggest using add_post_meta instead:

add_post_meta($applicantID, $prefix . "address", 'one', false);
add_post_meta($applicantID, $prefix . "address", 'two', false);

Notice the last parameter, it must be set to false. For more info, please see the Codex.