Re: Quickform: image as submit button?
| From: | Brett Bieber | Date: | Fri, 15 Dec 2006 20:31:30 +0000 |
| Subject: | Re: Quickform: image as submit button? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26116@lists.php.net to get a copy of this message | ||
On 12/14/06, Vignesh M P N <manivig@iit.edu> wrote:
Hi ========= Question 1 ========= I need to use image as submit button in my Quickform, so I assigned the "value" attribute as "submit". Please find below the way I define the image element.We use $form->addElement('xbutton','submit','Submit','type="submit"'); Which gets you <button type="submit" id="submit" name="submit">Submit</button> Which we then style with css: form#event_login button#submit { background: url(images/button/c_submit.gif) no-repeat 0 0; width: 48px; height: 21px; display: block; text-indent: -9999px; border: none; margin-top: 3px; cursor:pointer; } form#event_login button#submit:hover { background-position: 0 -22px; } As for question 2... I would just add two separate buttons and use a custom callback for the Login. -- -Brett http:saltybeagle.com aim:ianswerq