ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Chained Select Help Needed

March 23, 2012 10:51am

Subscribe [2]
  • #1 / Mar 23, 2012 10:51am

    DigitalDesigns

    94 posts

    Im sure you’ve seen the dynamic “appearing” select fields on the web that progressively show selection fields based on the selection of the first field.

    We are attempting to build a mobile site that incorporates a Chained Select set of fields and need some help.

    Channel 1 - State Entry
    Channel 2 - District Entry
    Channel 3 - City Entry

    First selection box is State, when selected, District appears - and when selected, City appears.  Once City is selected, the page changes to the “View” template for the city.

    We’ve seen a couple of chained select blogs, however none are up-to-date.  Would appreciate any help you have!

  • #2 / Mar 23, 2012 12:24pm

    Bhashkar Yadav

    727 posts

    i think, you are using relationship between State & District + relationship between District & City.
    - relating districts to state
    - cities to district

    to implement chained select boxes for state, district and city you have to fetch entries of that relationship and populate in select box on-change.

  • #3 / Mar 23, 2012 1:05pm

    DigitalDesigns

    94 posts

    Yes - sorry should have clarified

    We are relating the entries as you mention using Playa

    For Instance:

    State is a channel entry (Title is state name)

    District is a channel entry (Title is district name, Custom field is Playa relationship where state is selected)

    City is a channel entry (Title is city name, and custom field for Playa relationship where district is selected).

    *IF this is not the best way to get this type of function built - any suggestion is welcomed how best to do this (ie…categories, etc)

    What we need the CODE to execute the display of this information.  Script, java, ajax…whatever is needed that is both proven as well as intuitive to use.

    Thanks!

  • #4 / Mar 24, 2012 4:00pm

    Rob Games

    38 posts

    Hi DigitalDesigns,

    Try this Jquery plugin: http://www.appelsiini.net/projects/chained

    I used it recently to make a chained select just like you have mentioned using related entries.

  • #5 / Mar 26, 2012 12:02pm

    DigitalDesigns

    94 posts

    Thanks for the help with this, we will take a look and let you know how this works for us.

  • #6 / Mar 29, 2012 12:06pm

    DigitalDesigns

    94 posts

    Rob -

    This worked PERFECTLY - Thanks!

  • #7 / Mar 31, 2012 2:58pm

    Rob Games

    38 posts

    Pleasure 😉

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases