9 years ago
2
Topic

Hi there,

Well, I would like to populate a select dynamic field, but the truth is that I don't know which values I have to write in the 'WHERE' part.

I have a form with a simple text field, and I would like these values to appear in my select field in an another form. So the table is #__content, OK, but I don't know what should I write in the WHERE part.


I didn't find really great docs about the select dynamic. I had a look to the V2 documentation, but nothing seems answer this simple question.

I know this is a newbie question about SQL queries, but I prefer to ask, I think this will save me lots of time.


Thanks for your answers, and sorry for this newbie question.

Get a Book for SEBLOD
251 Posts
Viktor Iwan
9 years ago
1
Level 1

Please take a look at this one:

http://www.seblod.com/v2/documentation/seblod-2x/fields/types/1496-select-dynamic.html

Basically there are two type of select dynamic: Construction (default) and Free (advanced)

in Construction mode you just need to set  "Option Name" and "Option Value" with related link also you might want to filter with "Where"

for example

Option Name: title  (use field 'title' as dropdown's item name)

Option Value: id (use field 'id' as dropdown's item value)

Where: catid=20 (where category is 20)

Hope this helps

JuJ
9 years ago
0
Level 2

Hi Viktor,

Yes, this helps a lot! I understand much better with your explanations.

Well, so my values are in a specific App, not in a category (all my articles, whatever the app, are uncategorised, but maybe I should affect a category for each app?). So if I want to "filter" the values from a specific App, in which table should filter with my "WHERE" condition?

Thanks again for your help and answers! :)

Get a Book for SEBLOD