[TYPO3-core] RFC: Mailform doesn't work with image submit buttons #1374

rupert germann rupi at gmx.li
Sun Apr 30 12:12:23 CEST 2006


Hi Ingmar,

The patch works, but I would clean it up a bit. It's absolutely sufficient to 
check only for isset(mybutton_x) because if mybutton_x is set we can assume 
that mybutton_y exists, too. Also making a double check for 
isset($_POST['data']) && is_array($_POST['data']) makes no sense in my eyes 
because if the var is already an array it *is* set ;-)

cleaned patch is attached.

+1 for the cleaned patch

greets
rupert



On Friday 28 April 2006 23:18, Ingmar Schlecht wrote:
> Forgot to attach the patch. Here it is.
>
> - Ingmar
>
> Ingmar Schlecht schrieb:
> > This is a CVS patch request.
> >
> > Problem:
> > Mailforms don't work with <input type="image"> submit buttons.
> > This is because browsers don't send the value="..." attribute of image
> > buttons when the form is submitted. Instead, the x/y coordinates are
> > sent.
> >
> > Example:
> >    An image button like this:
> >          <input type="image" name="mybutton" src="test.jpg" />
> >    ...results in GET variables like this:
> >          &mybutton.x=199&mybutton.y=114
> >    ...which result in a PHP $_GET array like this:
> >          Array (
> >              [mybutton_x] => 199
> >              [mybutton_y] => 114
> >          )
> >
> > Solution:
> > Check for the _x and _y variables as well.
> >
> > BT reference: http://bugs.typo3.org/view.php?id=1374
> >
> > Branches: HEAD and 4.0
> >
> > The patch has been written by Thorsten Kahler.
> >
> > cheers
> > Ingmar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.tslib_fe_1374.diff
Type: text/x-diff
Size: 1502 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060430/9a2ae85f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060430/9a2ae85f/attachment.pgp 


More information about the TYPO3-team-core mailing list