So I'm trying to build a multiple select box where i move things from a 
select box on the left and put them on the right.  I have the values moving 
correctly through javascript but when i submit the form it doesn't pick up 
the value in the form.vars.
 forms = dict()
        
forms[0] = SQLFORM(db.stuff, submit_button='Create')
forms[0].element(_type='submit')['_class']='btn'
forms[0][0].insert(-1, TR(A("Add", \
                                        _id="add", \
                                        _class="btn btn-default btd-md" ), 
_id="buttons"))
forms[0][0].insert(-1, TR(sbox, SELECT(_id="selected", _name="selections", 
_multiple=""),**sbox_attributes))
forms[0][0].insert(-1, TR(A("- Remove", \
                                        _id="remove", \
                                        _class="btn btn-default btd-md" ) 
,_id="buttons"))

I add the button in a TR then the two SELECT boxes, sbox is a predefined 
SELECT box with prepopulated with options.  How do I get the form to submit 
the the values of the select box with name="selections"?  Do i need to use 
a custom form? just using the plain FORM tags?

Also as a side note, so on this page i have multiple forms, but could 
potentially be hundreds of forms, hence the dictionary of forms.  Is it 
better to send all the forms at once when the page is loaded? or should I 
only send the id's of the records and then when clicked send the forms?

-- 
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