PHP Classes

Reset Button

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  Reset Button  >  (Un) Subscribe thread alerts  
Subject:Reset Button
Summary:How can a button be used as reset button
Messages:6
Author:Shoeb
Date:2006-10-21 13:12:30
Update:2006-10-27 19:57:34
 

  1. Reset Button   Reply   Report abuse  
Picture of Shoeb Shoeb - 2006-10-21 13:12:30
Hi Manuel,

Please advice how can i use a reset button from this class. I checked the

ResetFormParts option but a bit confused.

Best Regards,
Accilies.

  2. Re: Reset Button   Reply   Report abuse  
Picture of Matías montes Matías montes - 2006-10-21 15:44:16 - In reply to message 1 from Shoeb
Hi Acciles.

you can declare Reset Buttons as any other input:

$f->AddInput(array(
"TYPE" => "reset",
"VALUE" => "Reset Form Values",
"ID" => "reset_button",
"NAME" => "reset_button"
));

And then add it to the output:

$f->AddInputPart("reset_button");

  3. Re: Reset Button   Reply   Report abuse  
Picture of Shoeb Shoeb - 2006-10-22 07:42:38 - In reply to message 2 from Matías montes
Hi Matías,

The answer is perfect! but how about a image button that can be used to reset forms ?

Best Regards,
Accilies

  4. Re: Reset Button   Reply   Report abuse  
Picture of Shoeb Shoeb - 2006-10-25 19:55:58 - In reply to message 3 from Shoeb
Hey guys any reply/taught on this ?

  5. Re: Reset Button   Reply   Report abuse  
Picture of Matías montes Matías montes - 2006-10-27 12:37:41 - In reply to message 4 from Shoeb
Sorry for the delay.

You might use a typical reset button and add a background to it using CSS or use an image with the proper ONCLIK event to reset the form

<img src="../mypic.gif" onclick="document.getElementById('myform').reset()"/>

  6. Re: Reset Button   Reply   Report abuse  
Picture of Shoeb Shoeb - 2006-10-27 19:57:34 - In reply to message 5 from Matías montes
Hi There,

Okay I have used the JS for resetting the form.

Many Thanks for the reply.

Regards,
Accilies