Auto Select

edited January 2011 in Modules
Hello,

First, I would like to congratulate the Fuel CMS team for putting out a such good work!!!

Moving on to my question. Essentially I am trying to populate a dropdown box based on a previous dropdown selection. For example, I need to populate a "state" dropdown based on a "country" selection, so if i select country>USA then it auto populates the state dropdown with the 50 states, if I select country>Canada then it auto populates with the Canada states. How can I accomplish that?

Is there anyone to point somewhere so I can take a look?

Thank you in advance,

Aiman Kennan

Comments

  • edited 8:47PM
    If you are trying to do this within a module's create/edit form, you will need to use javascript to ajax in the options of the dependent dropdown. You can add javascript files via the "js" module parameter:
    http://www.getfuelcms.com/user_guide/modules/simple

    Then you may need to create a controller that serves up those dependent options. The navigation module within fuel does something similar where it uses ajax to pull in the parent options for a navigation group (fuel/modules/fuel/controllers/navigation.php parents() method).
Sign In or Register to comment.