Re: QF Controller using an imgae submit button
| From: | Bertrand Mansion | Date: | Mon, 22 Sep 2003 12:12:34 +0000 |
| Subject: | Re: QF Controller using an imgae submit button | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7956@lists.php.net to get a copy of this message | ||
<mikeatwork@ukonline.co.uk> wrote :
> Hi,
>
> Having a play with the latest QF Controller class this morning as I've
> just been given the task of creating a new registration wizard (joy!)
>
> QF controller seems ot fit the bill perfectly, even the example could
> not be nicer.
>
> One small problem - I use image buttons for next/previous/cancel.
> $actions[] = &HTML_QuickForm::createElement('image', 'action',
> 'buttons/next.jpg', array('alt' =>
> $language['L_ButtonNext']));
>
> Reading the manual page
>
> http://pear.php.net/manual/en/package.html.html-quickform-controller.int
> ro.php I see it mentions a line about $this->addElement('submit',
> $this->getButtonName('submit'), 'Send');
>
> Is it possible to use the 'image' element type as a submit button in the
> QF controller?
Yes,
$this->addElement('image', $this->getButtonName('next'),
'buttons/next.jpg');
The controller should deal with the automatic formatting of image_x,
image_y.
Bertrand Mansion
Mamasam