I have something like this:
form = FORM('Emails:', BR(),
INPUT(_name='email',
requires=IS_NULL_OR(IS_EMAIL())), BR(),
INPUT(_name='email',
requires=IS_NULL_OR(IS_EMAIL())), BR(),
INPUT(_name='email',
requires=IS_NULL_OR(IS_EMAIL()
I forgot to mention, the form loads fine... I get the error on submit.
On Feb 26, 1:58 pm, minh wrote:
> I have something like this:
>
> form = FORM('Emails:', BR(),
> INPUT(_name='email',
> requires=IS_NULL_OR(IS_EMAIL())), BR(),
> INPUT(_name='ema
Try this. It builds the form dynamically on the client and server so
you get to keep the benefits of SQLFORM (validation, etc):
def invite():
fields = [Field('email',requires=IS_EMAIL())]
for r in range(1, len(request.vars)):
if 'email%s' % str(r) in request.vars.keys():
Whoops, that's response.flash :)
On Feb 28, 12:39 am, "mr.freeze" wrote:
> Try this. It builds the form dynamically on the client and server so
> you get to keep the benefits of SQLFORM (validation, etc):
>
> def invite():
> fields = [Field('email',requires=IS_EMAIL())]
> for r in range(1
Unfortunately you will not be able to "add" fields when using FORM.
You will have to iterate over the request.vars manually.
-Thadeus
On Fri, Feb 26, 2010 at 3:59 PM, minh wrote:
> I forgot to mention, the form loads fine... I get the error on submit.
>
> On Feb 26, 1:58 pm, minh wrote:
>>
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
6 matches
Mail list logo