Jump to content

Dropdown menu

dropdown menu sub items

  • Please log in to reply
2 replies to this topic

#1 mieszkos



  • Members
  • Pip
  • 2 posts

Posted 25 November 2013 - 10:11 AM

(Please delete one topic because I got lag when I was posting and it goes 2 times)


Hi all, I'm new here and I'm very happy to use Grocery Crud for CI but I have a problem

I want to make dropdowns lists like


Province (you are choosing province) then you are reciving District list and when you will get commune list, a read some topics here about making categories -> subcategories but I think its not for my DB Structure... so I have in my database table called Offers (there are some products) and I have table called OffersCommunes where I have 3 fields -> id_offer, id_commune,id_district


and I also have tables like province(id,name), provinceDistrict(id_province,id_district),district(id,name),districtCommune(id_district,id_commune),communes(id,name)


Can someone tell me how can i make for this dropdowns list ?


I want to have something like this http://demo.edynamic..._management/add

but for my DB structure, please help me and a lot of thanks! :)

#2 Racing Chocobo

Racing Chocobo


  • Members
  • PipPip
  • 28 posts

Posted 25 November 2013 - 12:51 PM

Hi, you can put all of the option of the state/province and the city/town in the javascript variable while rendering to your current page,

then change the option list every after the country selected value is change (by using jquery .change() function is one way)

#3 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 28 November 2013 - 01:02 PM

Well the same i believe is an example from the earlier post here


It is shared with the example - or you can download the code and adjust the same to your requirement


There is another one here which is more simple to use. I will recommend you hunt down a solution on the last link provided ... much easy to go and much easy to work with.


Happy GCing:)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users