Using the following code:
$this->Html->link(
'Meus Dados', array(
'controller' => 'Groups',
'action' => 'index'
)
);
The HTML link is created normally, but if I want to put a BUTTON in place of the LINK, to make it click that it is redirected to a specific ACTION of a CONTROLLER, it does not work.
I'm doing this:
echo $this->Form->button(
'Meus Dados', array(
'label' => '',
'style' => 'width: 100%, color: lightslategray',
'class' => 'topnav input-append fa fa-twitter fa-fw',
'url' => array(
'controller' => 'Groups',
'action' => 'index')
)
);
But nothing happens when I click the button, what am I doing wrong?