I put together a simple formButton helper if you want to use it it
appears to work.

<?php
        class FormButtonHelper extends HtmlHelper {
                var $helpers = array('Html');

                var $tags = array(
                        'button'        => '<input type="button" name="%s" %s/>'
                );
        /**
         * Creates a input type="button"
         *
         * @param  string  $fieldName The label appearing on the button
         * @param  array   $options
         * @return string  A HTML input button
         */
                function create ($fieldName, $options = array())
                {
                        return $this->output(sprintf($this->tags['button'], 
$fieldName,
$this->_parseAttributes($options, null, null, ' ')));
                }

        }
?>

save the code in /app/views/helpers/form_button.php
add var $helpers = array('formButton'); to your controller

Use the following example to create a button
<?php echo $formButton->create('CancelStep',
array('value'=>'Cancel')) ."\n"; ?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to