Is there a way to do this with FormHelper:
<button type="submit" class="btn"><i class="icon-search"></i> Sign in</button>
I tried it using $this->Form->end(); but it doesn't work as I wanted.
Is there a way to do this with FormHelper:
<button type="submit" class="btn"><i class="icon-search"></i> Sign in</button>
I tried it using $this->Form->end(); but it doesn't work as I wanted.
Did you read the manual? Seems like this is what you're looking for;
Creating buttons and submit elements
Something like this should probably work;
echo $this->Form->button(
'<i class="icon-search"></i> Sign in',
array('class' => 'btn', 'escape' => false)
);
'escape' => false in the options array, or the <i> will get escaped and passed through to be visible on the final page. You might also want to check out the Twitter Bootstrap Helper. (Full disclosure: the company I work for is responsible for that project.)button(), the default is already 'false' (which is inconsistent with 'input' and the HtmlHelper). I didn't test my example though, documentation may be wrong