You can navigate the form is you want...
form[0] is the table
form[0][0] is the first row of the table
form[0][0][1] is the second column of the first row
form[0][0][1][0] is the input in the second columnt of the first row
form[0][0][1][0]['_id'] is the '_id' attribute of that input, etc etc
etc
But this old stuff. Documented in the manual. You also reassign,
append and delete elements from the form.
form.append(DIV(INPUT(_name='hello'))
Massimo
On Nov 11, 10:08 am, "Wes James" <[EMAIL PROTECTED]> wrote:
> ok - i was reading something somewhere and it was an example one how
> to return the whole form component with with just one line - i guess i
> mis-read it.
>
> On Tue, Nov 11, 2008 at 9:05 AM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > if you have a field called 'fieldname' you can do
>
> > {{=form.latest.fieldname}} or {{=form.latest['fieldname']}}
>
> > and they both give you what would be the value for the field right
> > now. It returns a string, not and object.
>
> > Massimo
>
> > On Nov 11, 9:55 am, "Wes James" <[EMAIL PROTECTED]> wrote:
> >> I tried:
>
> >> {{=form.latest.fieldname['component']}}
>
> >> but i get the error:
>
> >> TypeError: string indices must be integers
>
> >> what is component supposed to be?
>
> >> thx,
>
> >> -wj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---