WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
Populate drop down custom field from another custom field in P (4 posts)

  1. freaksauce
    Member
    Posted 2 years ago #

    So I have a dropdown for States and I want to populate a Regions dropdown based on the value of States. I assume there is some way I can attach a jquery event to this first dropdown in order to do an ajax call to get the relevant Regions, just no idea where to put the code?

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. fireproofsocks
    Member
    Plugin Author

    Posted 2 years ago #

    You would have to build your own Ajax controller to handle that request and then modify the HTML used for that field so it had the correct CSS IDs to act as targets for the Javascript manipulations. See this page: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CustomizingManagerHTML -- you can modify the HTML used by that field to include the necessary Javascript calls and functions.

    Fair warning: What you're after is not trivial. You have to do a lot of dev work to make a clean UX like that.

  3. freaksauce
    Member
    Posted 2 years ago #

    Thanks for your help, I'm updating the regions select from static arrays that I saved in a php file in my theme dir using ajax so it was actually easier than I thought it would be once you had pointed me in the right direction. Thanks again for your help, just sent you a thank you donation.

  4. fireproofsocks
    Member
    Plugin Author

    Posted 2 years ago #

    Glad you got it all worked out! Thanks for the donation!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic