dependable drop down boxes

6 posts by 4 authors in: Forums > CMS Builder
Last Post: March 29, 2008   (RSS)

Re: [mawebplus] dependable drop down boxes

By Codee - March 15, 2008

I am anxious to read IT's answer on this one because this is a question I have as well. For me, it seems, the challenge is in the dynamics of the dropdowns. For example, if the first choice is "Make" and the visitor clicks "Ford" then there'll be one set of "Models" for the next drop down. If the visitor clicks "Chevrolet" then there needs to be a different set for "Models" - dependent upon the first dropdown's choice. I know there has to be subtables created in MySQL under Make to have the various specific Models appear. I just have no clue how to do this with CMS Builder. I know it can be done, lots of sites that use MySQL do it...but just don't know if CMS Builder is predesigned or has the capacity to do this.

Thanks,

Terry

Re: [mawebplus] dependable drop down boxes

By Dave - March 15, 2008

Hi Guys,

There's a few ways to do this and even some javascript/dhtml widgets you can find that update the secondary pulldowns without reloading the page.

A few questions first:

- Will these values be hardcoded or will the user need to change them?

- How many possible combinations will there be approx?

- Is there for the front end (eg: a website search engine) or for the backend as well? Could you just have a pulldown with all possible options for field 1, 2 and 3 on the backend editor?

One (simple) way to do it would be just have a section called "make_model_version" and add them all as breadcrumbs like this:

"Fruits > Banana > Hot"

Then on the backend users would scroll through a long pulldown to find the exact match for their listing. On the frontend you could have some PHP to turn those entries into javascript.

I'm not sure how easy it is to implement but here's a javascript one:
http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm

Let me know some more details and we'll see what we can do.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] dependable drop down boxes

By mawebplus - March 28, 2008

i managed to makeit work with javascript and onChange but only works in explorer not firefox. anyway, how can i do thisexactly butfor the cms builder administrator?? where do i code this?

Re: [mawebplus] dependable drop down boxes

By Dave - March 29, 2008

With Firfox you can check for javascript errors under: "Tools > Error console" to help track down the problem.

There's no easy way to add the multiple drop down boxes on the administrator part. I was thinking you could have a big list of the breadcrumbs on the backend and then the multiple dropdowns for the web visitors on the front end.

Would that work... or no?
Dave Edis - Senior Developer
interactivetools.com

Re: [mawebplus] dependable drop down boxes

By Djulia - March 29, 2008

Hi,

I think that this link can help you :
http://www.mattkruse.com/javascript/dynamicoptionlist/

Djulia