On 13/09/10 12:48, Stodge wrote:

> one view can't support
> three forms?

Uh, it certainly can if you want to write it that way: Multiple django
"form" objects can validate different parts of some request.POST
dataset, you're not limited to one post one form. You can even use
multiple instances of the same form (with different prefixes, but see
also "formsets", no need to reinvent the wheel there either)

Telling which one to actually use could just be a matter of the name of
the submit field used (beware breakage on ancient IE - in certain
situations it presented the submit field value where the standard was to
present the name or something like that, but that's now in the distant
and horrible past for most people), or a hidden field.

> What's the best way to implement this?

That depends, probably. If you're already invested in ajaxy stuff, then
it probably _is_ most manageable to make three separate views, and embed
them into tabs in a page returned by a fourth simple view.  That would
be straightforward with e.g. jquery-ui's tabs (and presumably several
other javascript frameworks').

In the jquery case, you could consider the e.g. the very handy
jquery-form [1] plugin to convert your form posts to ajax requests.

[1] http://jquery.malsup.com/form/


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to