How to submit post data with dijit.form.Form with Dojo?

Sasa picture Sasa · Jan 30, 2011 · Viewed 9.8k times · Source

I got this simple form with javascript's toolkit dojo into an HTML element form:

But when clicking the submit button, the form is submitting without any post data.

What am I doing wrong?

Answer

DanneManne picture DanneManne · Jan 31, 2011

I think the problem is that your dijit form fields don't have any names. I know you have specified the names in the html code but I think it is necessary to include them in you dijit calls as well, otherwise the submit doesn't know under what names to send the form data.

For Example:

var title = new dijit.form.ValidationTextBox({
    required: true,
    trim: true,
    name: "title"
}, "title");