Welcome, Guest
Username Password: Remember me

dropdown filtered list!
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: dropdown filtered list!

dropdown filtered list! 1 year, 11 months ago #1

  • fox007
  • ( Moderator )
  • OFFLINE
  • Moderator
  • Posts: 147
  • Karma: 3
Hello everybody!

I'm so excited there's finally a way to SEARCH!
I mean...SEARCH!!!
With J and some components you never been free to search with your criteria...and now...here comes Jseblod!!!

Ok ok..sorry...i'm so glad to this team that i'd helped for the first time the joomla community (with translation )

So here it is:

I've a content with :
- 2 dropdown
- some text field

I'de like to have a list with the 2 dropdown field that shows articles when matching with user selection.

I mean no "simple search"
but something like "filter list", better if without search button!

Honestly i'm trying to do something like airport a/r list with a "from/to" concept that show records that exactly match with both dropdown fields !

Is it possible?

Re:dropdown filtered list! 1 year, 11 months ago #2

  • gobezu
  • ( User )
  • OFFLINE
  • Moderator
  • Posts: 205
  • Karma: 2
Hi fox007,

I totally am with you regarding your enthusiasm about jSeblod CCK , lets be grateful for such wonderful team and do what we can to support their progress!

Going now to your issue and hoping that I have understood you correctly here follows my suggestion:

First: lets nail down that to have any kind of search/filter you would need a search form. Therefore you would need to create a search type.

Second: if you don't want a button to appear in your form, then just remove it from your set of search fields within the search type you are developing.

Third: in order to have the search form posted upon change in your select lists you would need to tie each of your select's with a piece of js-code that will help you post it back. That code is something you could hang in from your form-template, and the following will work:

<?php
$view = JRequest::getString('view');
if ($view == 'search') :
?>
<script type="text/javascript">
window.addEvent("domready",function(){
$ES('#selectlist1, #selectlist2').addEvent('change', function() {
this.form.submit();
}
);
});
</script>
<?php endif; ?>

Please make sure to change #selectlist1 and #selectlist2 with the Name (make sure its the Name within the field definition) of the select fields you have setup. If you need more fields to act as trigger for you search you simply need to add them to the list of fields.

Good luck!
Last Edit: 1 year, 11 months ago by gobezu.
  • Page:
  • 1
Time to create page: 0.15 seconds