This topic is locked

multiple selections

6/8/2007 12:29:59 PM
PHPRunner General questions
O
ombilicus author

Hello,

I've seen many posts on this issue but none seem to have found a suitable solution.

I think this is a common scenario in building database-driven sites and should be addressed.
The goal is to be able to select multiple values to be stored as an array in one database field (exactly like the "list of values" from the lookup wizard) but using dynamic data. we CAN'T populate a list of values from a database table, only a drop down (which doesn't support multi-select). So the ideal situation would be to either have a lookup wizard LIST loaded from DB values or even better having multiple checkboxes appear according to entries in another table.
To take the pizza toppings as a simple example, you would have a DB table 'toppings' where you insert all available toppings, and a 'pizza' table where you could click multiple toppings in checkboxes. Now, to create a field manually for each topping to use as checkbox OR to use a manual 'list of values' that allow multiple selection AREN'T good solutions since the goal is to be able to DYNAMICALLY ADD new toppings to the DB in the future and they would appear in the pizza FORM.
Here's a thought, maybe the simple solution would be to edit the script where the LIST OF VALUES is generated. Instead of having the values harcoded, it can loop through a table...
Any thoughts would be appreciated.
Thanks

O
ombilicus author 6/8/2007

ok here's what I found while playing around a bit.

When you select the LOOKUP TABLE, you can populate from DB table obviously. I thought the multiline number of rows would apply only if I used the manual list but this works by setting it to higher than 1 even with lookup table.
The only bug is that it displays only the first one in the LIST and VIEW pages.

I check in mysql DB and it was inserted correctly as an array. Also, it's buggy when using the ADD VALUES ON THE FLY.
This could work for now but would really love a solution for checkboxes. It would seem more logical a choice of component and nicer too.

Sergey Kornilov admin 6/8/2007

We plan to have new Edit control "Set of checkboxes" in one of the next updates.

O
ombilicus author 6/9/2007

Thanks, that would be great.

Do you have any suggestions in the meantime, on how to customize the code for multi-checkboxes?

B
bueno 8/3/2007

Any update ?

Sergey Kornilov admin 8/3/2007

Not yet.

N
nxfxcom 11/12/2008

Now?
I have a list menu with about 40 Entries, its crazy!