Is that the entire view? You haven't included the form anywhere, so there 
are no company_0, company_1, etc. inputs.

Anthony

On Sunday, March 17, 2013 9:48:32 AM UTC-4, 黄祥 wrote:
>
> @anthony : thank you for correcting me anthony
> @richard : i'm learning to use 2 input form too but not work as expected 
> (no error occured), the data is not insert after i submit it. any idea 
> about this?
> thank you
>
> *default.py*
> def test():
>     inputs = []
>     for i in range(0, int(request.vars.row)):
>         inputs.append(db.company.company.clone(name='%s_%s' % (
> db.company.company.name, i)))
>     form = SQLFORM.factory(*inputs)
>     if form.process().accepted:
>         for i in range(0, int(request.vars.row)):
>             db.company.insert(company=form.vars['company_%s' % i])
>     elif form.errors:
>         response.flash = 'form has errors'
>     return dict(form=form)
>
> def index():
>     return dict()
>
> *index.html*
> {{extend 'layout.html'}}
>
> <form>
>    <input name="row" onkeyup="ajax('test', ['row'], 'target')" />
> </form>
>
> <div id='target'></div>
>

-- 

--- 
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/groups/opt_out.


Reply via email to