Re: BUG? connection library appends the first submit found not the one pressed
> <petermichaux@> wrote:
> > Hi,
> > I'm reading the connection library form serialization code. In the
> > case that appeneds the value of the pressed submit button, it looks
> > like the value of first submit input found in the form is appended.
> > This is not necessarily the button that was pressed. Is this true? Is
> > there a reason for this design decision? If the server script depends
> > on which button was pressed this doesn't look like it will supply the
> > correct value.
> It was not so much a design decision, but a current limitation.
> Multiple submit button support is in the development queue; and,
> hopefully without adding any dependencies.
Thanks for the reply.
What ideas do you have to handle multiple button support?
I was thinking of something like this
<input type="submit" name="button1" value="asdf"
The recorded value would need to be removed immediately after
serialization so that it is not submitted with the next form
submission. The next submissions may be initiated by a button that
doesn't call the setButton() method and therefore doesn't reset the
stored button value.