I’m using this code now
echo $form->input(‘username’);
How do I make sure the label shows up on a different line than the input field?
I managed to imitate what I’m trying to do, just want to make sure that I’m using it the right way.
echo $form->label(‘username’, ‘Username’);
echo $form->input(‘username’, array(‘label’ => false));
Thanks,
Tee
The core of your request is putting a line-break between the
<label>and<input>tags created by theFormHelper::inputmethod. You can accomplish this in several ways. Probably the simplest option is the following:Or you could also use a pure CSS solution, something like:
This second option would leave you with cleaner PHP in your views, at the cost of more potential layout/stylesheet headaches.