Add reset button to Drupal Form

Drupal by default does not have reset button. However, you may just add reset button by adding this code in form array.

$form['reset'] = array (
		'#type' => 'markup',
		'#value' => '<input class="form-button" type="reset" value=" Reset " />',
		);

Simple as that.

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.