You can accomplish this with a text field - you then parse the input.

You can see a (somewhat messy - as it evolved incrementally over several
manual efforts - and really needs some refactoring into smaller functions) -
in the batch registration processing for PyCon 2010:   I wanted to take a
list of applicants:   First_name, last_name, email, and optionally city,
state.   I used the collections namedtuple library to validate the basic
fields, then added table field validation.

Normally, you can just use FORM.factory to build up forms with fields that
contain tables (or parts of tables), and other fields.   I needed to do more
validation, so I just made a memory based database table.   You may be able
to do a much simpler  text field, and process similarly to how you see it in
the batch code.

I apologize in advance for the messiness of that code (it is not really
ready for reading / consumption - if I had more time, I would have cleaned
up the code, made it cleaner):

http://code.google.com/p/web2conf/source/browse/applications/register/controllers/batch.py?repo=pycon2010

- Yarko


On Fri, Feb 26, 2010 at 4:11 PM, Thadeus Burgess <thade...@thadeusb.com>
wrote:
Unfortunately you will not be able to "add" fields when using FORM.
You will have to iterate over the request.vars manually.

-Thadeus

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to