Adding an additional link button to a form (using form->create)
Posted
by cloudhead
on Stack Overflow
See other posts from Stack Overflow
or by cloudhead
Published on 2010-04-14T23:34:33Z
Indexed on
2010/04/14
23:53 UTC
Read the original article
Hit count: 205
cakephp
I have recently been assigned a CSS & design project that's in a CakePHP environment and would like to know if I can add an additional button to the form, for a "sign up" link.
The form is currently:
echo $form->create('User', array('action' => 'login'));
echo $form->inputs(array(
'legend' => 'Please log in:',
'username', 'password'));
echo $form->end('Login');
I would like to inject a button that goes to an action of 'register', preferably after the "Login" button, on the same line, like this:
username: [ ]
password: [ ]
[Log In] [Register]
I have everything but the 'register' button. Is this possible using the 'automagic' form creation? Thank you.
© Stack Overflow or respective owner