On Feb 11, 10:01 am, "Chris Miles" <[EMAIL PROTECTED]> wrote:
> Is it this todolist tutorial?  Unfortunately it contains no files...
> Have they moved it elsewhere?
>
> http://www.turbogears.org/docs/tutorials/todolist/
>
> I should've also mentioned that I'm fine with the JS/MochiKit side of
> things, I mainly want to see how best to handle the form processing of
> unknown number of fields on the controller side (the form widgets,
> validation, etc).

I'm about to try this myself, so I don't know for sure. But I gather
than if you submit values for multiple form elements with the same
name, they are joined into a list. Your input parameters would be the
same as if you only had 1 field, but you could get back a single
string or a list of strings. Therefore you will probably want to pass
it through the Set() validator, so that you always get a list of text
fields. You can then iterate through that list in the controller. I'm
guessing there has to be some way of nesting validators so that each
string in the list is also validated, but I've not looked that far
ahead yet. Any advice from others would be appreciated!

--
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to