Lally Singh napisaƂ(a):
> Hey all, I'm building a small survey application.  I've been trying to
> go along with the CForms docs, but find some good gaps in my
> understanding of how to do stuff.
>
>
> Specifically, I've got a system that generates questions based on two
> parameters (a class ID like 'ECE2504' and a term ID like '200701'),
> and was hoping to use views to generate the definition and template
> files.
>
> Can I invoke views with parameters here?  Something like this:
> function doSurvey (course, term) {
>   var form = new Form ("generate-questions?cocoon-view=form-def");
>   form.showForm("generate-questions?cocoon-view=form-disp", {
> course=course, term=term });
>   // I'll have to figure out how to store these results here, somehow.
>   cocoon.sendPage ("surveyDone");
> }
>
> I know showForm() can take in a map of parameters, but I didn't see
> anything like that for Form().

You can include parameters in query string but it must be a call to
sitemap ;)
I think you want to do this:
var form = new Form ("cocoon:/generate-questions?cocoon-view=form-def");

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to