Ticket #666 (closed defect: wontfix)

Opened 3 years ago

Last modified 15 months ago

"file","submit","reset","button" not sent with form

Reported by: anonymous Owned by: jburke
Priority: normal Milestone: 1.0
Component: IO Version: browserio_package
Severity: normal Keywords:
Cc:

Description

I really do wonder if that is the correct approach, especially as many server scripters test existence of the submit button before processing the form:

if get_request().get_field('submitBtnName') is not None:

// process form

From BrowserIO.js:

// only add if input of type NOT in array

else if(!dojo.lang.inArray(type, ["file", "submit", "reset", "button"])) {

values.push(name + "=" + enc(elm.value));

}

Perhaps either setting flags for send_file, send_submit etc or defining the array of unsent types elsewhere might be prudent?

regards, Mark (pending dojo fan)

Change History

Changed 2 years ago by dylan

  • owner changed from anonymous to alex
  • component changed from General to IO
  • milestone set to 0.5

seems like a reasonable request.... perhaps a dj_config prop for this.

Changed 2 years ago by dylan

  • owner changed from alex to jburke

Changed 16 months ago by jburke

  • milestone changed from 0.9 to 1.0

Moving this to 1.0, since the behavior is the same in 0.4.3, and we just want to get a 0.9 that matches rough parity with 0.4.3.

Changed 15 months ago by jburke

  • status changed from new to closed
  • resolution set to wontfix

I don't think we'll provide a flag for this. Normally, the browser will just send the submit type that was actually clicked, not all submit types in the form. Additionally, I do not believe resets are sent, and file content can be sent by using the dojo.io.iframe (Dojo 0.9) and dojo.io.IframeIO (Dojo 0.4).

Ideally we could send the submit type that was clicked, but I do not believe we have access to this. A workaround (using Dojo 0.9 names here):

If you want to include the submit type that was clicked in the form, perhaps intercept click actions on those input types, do the dojo.formToObject() call, then add the info for that specific submit type, cancel the event, then send your form-based object to the server via one of the dojo.xhr* calls.

Note: See TracTickets for help on using tickets.