Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

[Long story short]

Is there any Wordpress plugin/function that would allow the creation/integration of a metabox's textfield that automatically populates a dropdown menu (in the admin area, while in the article creation screen) where to pick the desired value withouth having to write it down by hand every time? And if so, is there anything like that?

[A little bit of information]

I'm taking care of an infected Wordpress site by doing a fresh new installation and configuring it from scratch. The owner used "Verve metaboxes" in order to manage 3 custom fields (coutry, town, and address): he states that - while creating a new article - he could click on the country textfield and pick from a populated dropdown menu the correct value. He then proceded to say that once
he selected a county and clicked on the "town" textfield, he would get a list of the towns of THAT and ONLY country. The same goes for the street (once selected the town, he would get only results for that town only).

Verve Metaboxes is now discontinued due to vulnerabilities and I cannot (nor want) to use it - I've then spent a few hours trying to find an alternative and/or a tutorial that would allow me to duplicate this feature but I couldn't find any.

So I wonder, is there anything like that or the owner of that website is merely delusional/trying to ask for new features without any clue?

Thanks in advance

share|improve this question
add comment

1 Answer 1

I am familiar with Advanced Custom Fields and he has many nice features, but not this one.

Just did some tests with Custom Content Type Manager and looks like it also doesn't have it.

Case you don't find a fit one, I think some jQuery may solve your problem using any plugin or hand made meta boxes.

Start with only the main meta box showing (countries). And detect changes in its field value so as to show/hide the second level of meta boxes. This second level will do the same for the third.

Refer to this answer where you have an example of showing/hiding the Featured Image meta box according to changes in the dropdown field Template that belongs to the Page Attributes meta box.

[update]
Another variation I did of the same script, a bit more complex.

share|improve this answer
1  
Advanced Custom Fields can do this, it just takes a bit of fiddling and time to enter all the options. You'd need to create a main dropdown for the "country", then secondary dropdowns for the "town", one for each country. Then each town dropdown has a "conditional logic" option where you can display based on the "country" value. –  guiniveretoo Nov 21 '13 at 23:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.