Hi!
I need to add extra fields to my custom form generated from some fields of 
different tables. These extra fields are are additional phone numbers for 
the institution.
The code looks like this (here simplified for better readability): 

In model:
db.define_table ('institutions',
    Field('name'))

db.define_table ('phone',
    Field('number'),
    Field('institution', 'reference institutions'))

In controler:
form=SQLFORM.factory(
    db.institution.name,
    db.phone.number,
    (.... many additional fields are here))

In view:
{{=form}}
   
The question is how to add another phone.number inputs on a user request. 
I've successfully created ajax connection which adds an extra inputs on 
button click but I really need to place this extra inputs for phone number 
just below the default phone.number input. I have no concept how to insert 
a placeholder for new inputs in a form created by SQLFORM. In fact I need 
to create extra rows in existing table. Do you have any advise for my?
Przemek      

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to