Have searched around but can’ find an answer to this. I know it’s common feature need.
I want to make a search widget where you select the first field, say Make, and then the second field Model is populated by possible values of Model for that Make.
So if you select Ford then only Ford models appear in the Model selector.
I see two ways in general this could work.
Possible values for all fields are predetermined. The Ford make field is related to values for all possible Ford models
or a more dynamic solution… after you select the first field value then the additional fields are populated by values that have been entered in channel entries.
ex: If I select Ford in the Make fields then the Model field is populated not by all possible Ford models but by Ford models for which there are channel entries.
So if there are no Ford entries that have a Model value of Focus then Focus does not appear in the drop down selector for models.
Is there an addon with this sort of functionality or are we talking javascripting?
I am looking for the least technical solution possible as custom JS coding is beyond me.
Thanks for any ideas or points in the right direction.
THanks!
Greg
Like Ingmar, also don’t know of a ready-made add-on. Yes it’s a common feature but I’d imagine each solution is custom because the mechanics are quite simple and the data models and rules for population vary. For this, you’d basically listen for a change event on a select box, then fire an AJAX request to get Models for the selected Make, then populate the other select box with the result set. Might be a good opportunity to dive into some custom AJAX development.
I have done this to show counties and then towns in that county for a restaurants listing page. It was rather easy, actually!
http://ruralintelligence.com/food_section/food_restaurant_listing
If you still need this, let me know. Sorry I only just noticed this 8 months later!
Terry
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.