selectBox loading values from database

Notice: This thread is very old.
albertosanchezm
Member | 12
+
0
-

Hello,

I just want to use the selectBox from the Forms component loading values from a database table (the regular id / value table). How can I do that?

Thanks a lot.

Oli
Member | 1215
+
0
-

SelectBox has id and value as array. If you use nette database, you can use Database: Selection

$table->fetchPairs($key, $value);