Page 1 of 1

Custom Submit and Clear Button using form

Posted: Sat May 05, 2007 3:54 pm
by chriscrooz
I'm using a form for my contact page which is linked to a PHP page to send the mail. I'd really like to create a custom submit and clear button for my html page which I think I read requres using a Image Widget but for some reason it doesn't function. Do I need to add a variable to the PHP so it will work? here's the code on the HTML code embedded in a FORM TAG

Code: Select all

<INPUT name="reset" TYPE="image" SRC="images/clear_btn.gif" CLASS=contactTitle2 STYLE="border: 1px solid #333333;"  VALUE="Clear">
<INPUT name="submit" SRC="images/submit_btn.gif" TYPE="image" CLASS=contactTitle2 STYLE="border: 1px solid #333333;" VALUE="Send">

Re: Custom Submit and Clear Button using form

Posted: Sat May 05, 2007 8:21 pm
by califdon
chriscrooz wrote:I'm using a form for my contact page which is linked to a PHP page to send the mail. I'd really like to create a custom submit and clear button for my html page which I think I read requres using a Image Widget but for some reason it doesn't function. Do I need to add a variable to the PHP so it will work? here's the code on the HTML code embedded in a FORM TAG

Code: Select all

<INPUT name="reset" TYPE="image" SRC="images/clear_btn.gif" CLASS=contactTitle2 STYLE="border: 1px solid #333333;"  VALUE="Clear">
<INPUT name="submit" SRC="images/submit_btn.gif" TYPE="image" CLASS=contactTitle2 STYLE="border: 1px solid #333333;" VALUE="Send">
You don't have any event code to make them do whatever you want them to do. The standard Submit and Reset TYPES have that code built into them, but when you want a custom image, you have to use TYPE=image, so you lose the built-in functionality. You will have to add an OnClick attribute calling some Javascript code to do that.