Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a Non-Database-Driven Lookup

Lots of references for creating lookups out there, but all seem to draw their values from a query.

I want to add a lookup to a field that will add items from a list of values that do not come from a table, query, or any other data source.

Such as from a string: "Bananas, Apples, Oranges" ..or a container ["Bananas", "Apples", "Oranges"]

Assume the string/container is a dynamic object. Drawing from an static enum is not a choice.

Is there a way to create lookups on the fly from something other than a data source?

Example code would be a great help, but I'll take hints as well.

like image 792
Brad Avatar asked Jan 19 '26 23:01

Brad


1 Answers

There is the color picker.

Also in the Global you will find pickXxxx such as pickList. There are others, pickUser, pickUserGroup etc.

Take a look on the implementation. I guess they build a temporary table then displays that. Tables are great!

Update:

To go on you own follow the rules.

For the advanced user, see also: Lookup form returning more than one value.

like image 182
Jan B. Kjeldsen Avatar answered Jan 23 '26 08:01

Jan B. Kjeldsen