I have this code in my wordpress submit form; <?php wp_dropdown_categories('show_option_none='.__('Select category', "wpct").'&hide_empty=0&hierarchical=1&name=category); ?> It shows the categories to choose from in the dropdown like below; MainCat1 --MainCat1sub1 --MainCat1sub2 --MainCat1sub3 MainCat2 --MainCat2sub1 --MainCat2sub2 --MainCat2sub3 I want to have two dropdown where the first one will show only the parent or the main category. And when a particular Main category is selected it will show a second dropdown showing its child or subcategory. This should be done without submitting the form first. I've already tried some tutorials for it's implementation but somehow I got stuck with just my basic knowledge about java. Anyway, I'm donating 10$ for those who can provide me with a working code through pm.