The documentation shows a usage example like:
FORM(SELECT('option1', 'option2', 'option3',_name="my_selector"))
however, when we create an option box dynamically, we will probably have a list of options. in this case, we will use SELECT as follows:
` options = ['option1', 'option2', 'option3']
FORM(SELECT(*options, **dict(_name="my_selector"))`
When we want the user to select values from a database (eg names), but we want the form to return the associated primary key, we can do as follows:
` staff = db(db.staff.ALL).select()
FORM(TR("Select a user :",
SELECT(_name='staffselect',
*[OPTION(staff[i].username, _value=str(staff[i].id)) for i in range(len(staff))])),
TR(INPUT(_type='submit')))`
Now the option box will display the usernames, but the form will return the staff.id