12 Posts
3 years ago

Hy there,

I have a special question.

I am aware of how to use the Search Query Field (buyed) and it works.

Also i am aware how to set up a dynamic dropdown from a table.

My Question is, how can i combine this ?

I want a list of Countries of a specific Table in my Database (jos_countries) as a dropdown. After this a "Show Adress" Button to confirm

As soon i choosed my country the SEARCH QUERY field should search for the infos that are in the same record like the countrie choosed by the dynamic field.

I tried it with loading the cck->getValue('dynamic_dropdown_list') or with conditional states. But to be hones i have acutally no clue how i can do this.

Did somebody doing something like this ? Thanks in Advance

Get a VIP membership
12 Posts
3 years ago
Level 1

Update, found the solution by trying a few days, hope this is correct and not a poor construction solution, any other inputs are appreciated

In the  "Search Query" Field the WHERE Varaible directly read out the value of my "Dynamic Select" Field like this example:

SELECT country FROM Tablename WHERE country=('$uri->getValue('dynamic select fieldname')') 

After this put a "Submit Button" to trigger the dynamic field and under "conditional state" set the "Search Query" Field to hidden until the "Submit Button" is pressed. 

Et Voila

Love Selbod since years, but unfortunately the documentation is very poor and often outdated with old versions.

Get a Book for SEBLOD