Title: Populate select field from code
Last modified: June 3, 2020

---

# Populate select field from code

 *  Resolved [oterox](https://wordpress.org/support/users/oterox/)
 * (@oterox)
 * [6 years ago](https://wordpress.org/support/topic/populate-select-field-from-code/)
 * Hi,
    Is it possible to populate a select field with data from an external source,
   like an API? Thk

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [6 years ago](https://wordpress.org/support/topic/populate-select-field-from-code/#post-12931587)
 * Hey [@oterox](https://wordpress.org/support/users/oterox/),
 * Thanks for reaching out to us.
 * This is possible but would require custom code which is beyond the scope of our
   support.
 *  Thread Starter [oterox](https://wordpress.org/support/users/oterox/)
 * (@oterox)
 * [6 years ago](https://wordpress.org/support/topic/populate-select-field-from-code/#post-12931600)
 * Just need to know if there’s any hook/filter to do it 😉
 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [6 years ago](https://wordpress.org/support/topic/populate-select-field-from-code/#post-12931614)
 * Hey [@oterox](https://wordpress.org/support/users/oterox/),
 * Please find an example code at [https://github.com/ibericode/mc4wp-snippets/blob/master/forms/replace-string-in-form-content.php](https://github.com/ibericode/mc4wp-snippets/blob/master/forms/replace-string-in-form-content.php).
 * With this code, a variable in the form such as `{MY_POST_OPTIONS}` gets replaced
   with custom code.
 *  Thread Starter [oterox](https://wordpress.org/support/users/oterox/)
 * (@oterox)
 * [6 years ago](https://wordpress.org/support/topic/populate-select-field-from-code/#post-12931622)
 * Thank you Harish!!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Populate select field from code’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 4 replies
 * 2 participants
 * Last reply from: [oterox](https://wordpress.org/support/users/oterox/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/populate-select-field-from-code/#post-12931622)
 * Status: resolved