Title: Choices Callback is not saving data
Last modified: October 2, 2020

---

# Choices Callback is not saving data

 *  Resolved [unkown09](https://wordpress.org/support/users/unkown09/)
 * (@unkown09)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/choices-callback-is-not-saving-data/)
 * i created a dropdown(parent) and the second one with parent choices callback
   
   i use this function
 * function getcity() {
    $choice = $_POST[‘parent_option’]; switch($choice) { case“
   Andaman & Nicobar”: $city = [ “Alipur” => “Alipur”, “Andaman Island” => “Andaman
   Island”, “Anderson Island” => “Anderson Island”, “Arainj-Laka-Punga” => “Arainj-
   Laka-Punga”, “Austinabad” => “Austinabad”, “Bamboo Flat” => “Bamboo Flat”]; break;
   default: $city = [——]; } return $city; }
 * this works exactly what i want in forntend but when i am submitting any information
   with the second choices callback filed it’s not saving the information(first 
   parent dropdown is saved there is no problem with that).
 * help please!!

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/choices-callback-is-not-saving-data/#post-13522109)
 * Hi [@unkown09](https://wordpress.org/support/users/unkown09/)
 * Sorry for the late response.
 * Have you checked the sample code in the link?
    [https://docs.ultimatemember.com/article/1539-choices-callback-feature-in-um-2-1](https://docs.ultimatemember.com/article/1539-choices-callback-feature-in-um-2-1)
 * please feel free to re-open this thread by marking this topic as “Not Resolved”
   so that we can get back to you.
 * Regards,

Viewing 1 replies (of 1 total)

The topic ‘Choices Callback is not saving data’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/choices-callback-is-not-saving-data/#post-13522109)
 * Status: resolved