Make a form with a hidden input and a submit button. Display all the 
images, add javascript so when one image is clicked it becomes "selected" 
and its id is added to the hidden input (for instance the hidden input can 
store the values comma separated). Submit the form and in your controller 
you should have the selected images in the hidden input's name. You can 
then validate it using something like:

values, error = IS_IN_DB(db, 'pictures.id', multiple=True, 
delimiter=',')(request.vars.hidden_input_name)

Finally after checking error is None insert the values into choices:

for value in values:
    db.choices.insert(user_id=auth.user_id, choice=value)

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to