On 26 Oct 2006, at 15:11, Sylvain Wallez wrote:

Jeremy Quinn wrote:
Hi All

I am doing some work on CForms.

I have now got AJAX-type submission via IframeIO in Dojo working for
forms that have file-upload controls in them.

I am aiming to get progress-bars working for Upload Widgets in Cocoon
..... (there is a ProgressBarWidget in the new Dojo 0.4.0 :-) )

But meanwhile, I am trying to get some sort of Upload Repeater working
and I have several problems ......

The usecase is that a user may add a number of file-upload controls to
a repeater, select files for them, then submit them all in one go.

One problem is, that if you have file-upload controls on a form, that
have a file selected, they get submitted when you click on the
repeater's add button, as these action-events submit the whole form.

I would like to change this behaviour but do not know if this will
break some other usecases.

While working on the CForms Widget, to get IframeIO working, I
switched to using Dojo's built-in form preparation code (instead of
cocoon.forms.buildQueryString). Dojo has equivalent method that can
take a filter function as an argument, meaning we could have a special
filter to be used when submitting an action-event.

Can you think of any usecases where sending only the minimal
button-event would break existing CForms functionality ?

IIRC Dojo's built-in function doesn't allow to specify what input
triggered the form submit, which is absolutely needed for CForms to
properly handle fd:submits and fd:actions. Now I haven't looked at Dojo
for quite some time and it may allow it now.

Hi Sylvain

I am not sure I get your point ..... sorry

I do not propose that the behaviour of the full submit button is changed, only action-submits (maybe only action-submits in repeaters). In these cases, I am trying to work out if only the hidden 'forms_submit_id' field could be sent, instead of the whole form (which gets no validation at this stage anyway).

Alternatively, action-submits could be made to use a special filter to remove file-upload controls from their submit.

Or am I missing something ? :-)

regards Jeremy


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to