Reset Button for Drupal… revisited

Howdy!

I was wondering how to insert reset button in drupal and include the button attributes

<?php

$form['clear'] = array (
'#name' => 'clear',
 '#type' => 'button',
 '#value' => t('Reset'),
 '#attributes' => array('onclick' => 'this.form.reset(); return false;'),
 ); ?>

There… problem solved!!

2 thoughts on “Reset Button for Drupal… revisited

  1. Anonymous May 28, 2011 / 8:47 AM

    This one really helps.

  2. Anonymous August 29, 2011 / 5:59 AM

    thank you pal, this really help and simple, like it

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.