7.3.5.2 button
button(string $title, array $options = array())
Creates an HTML button with the specified title and a default type of "button". Setting $options['type'] will output one of the three possible button types:
- button: Creates a standard push button (the default).
- reset: Creates a form reset button.
- submit: Same as the
$form->submitmethod.
<?php
echo $form->button('A Button');
echo $form->button('Another Button', array('type'=>'button'));
echo $form->button('Reset the Form', array('type'=>'reset'));
echo $form->button('Submit Form', array('type'=>'submit'));
?> <?phpecho $form->button('A Button');echo $form->button('Another Button', array('type'=>'button'));echo $form->button('Reset the Form', array('type'=>'reset'));echo $form->button('Submit Form', array('type'=>'submit'));?>
Will output:
<input type="button" value="A Button" /> <input type="button" value="Another Button" /> <input type="reset" value="Reset the Form" /> <input type="Submit" value="Submit Form" />


























