Aydin, you are the MAN! This worked, except that I had to add spaces after some of the "$" because they were assignment statements as follows:
$ d = {} $for k in form.inputs: $ d[k.name] = k.value $ d["id"] = photo.id Thank you! I guess as a general rule it's a good idea to handle the bulk of the heavylifting in the main code and then just have template render it eh? Jim On Thu, Mar 3, 2011 at 5:58 PM, Aydın ŞEN <adigeay...@gmail.com> wrote: > As i know you can not directly assign value of form field in template. You > can use form.fill(args) in template also but it is important that you have > to assign all values of fields (in args) otherwise they will be assigned > empty values. > > For example you can use like that: > > $def with (photoarray, form) >> $for photo in photoarray: >> $ d = {} >> $for k in form.inputs: >> $d[k.name] = k.value >> $d["id"] = photo.id >> $form.fill(d) >> <form method="post"> >> $:form.render() >> </form> >> > > -- > Aydın Şen > > -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.