Toby - you seem to be using the google groups as a source for all your
answers. Might I reccomend that you learn to use the api.cakephp.org
pages and the book.cakephp.org pages as a reference before posting
here?
On Sep 22, 7:17 am, RichardAtHome [EMAIL PROTECTED] wrote:
Note:
div
When you use the form-input, you automatically get a label tag
generated etc
However this does not contain a class.
So usually, the best thing to get several form fields and labels
aligned is:
div class=labelSomething/div
div class=inputfieldinput type=text //div
div
Hi toby,
I want to avoid having a css entry for every single input field and
would like to use a class.
How can this be done in cakePHP, so that all labels use the same css
class ?
Cake wraps the label and input in a div, by default it applies a class
of 'input' to that div. So you
2008/9/22 toby78 [EMAIL PROTECTED]
When you use the form-input, you automatically get a label tag
generated etc
However this does not contain a class.
So usually, the best thing to get several form fields and labels
aligned is:
div class=labelSomething/div
div class=inputfieldinput
You can use an array to specify label's tag attributes:
$form-input('Schedule.expected_check_in', array('label' =
array('class' = 'input-label', 'text' = 'Expected Arrival', 'title'
= 'When are you expecting to arrive at the place?')));
The 'text' key is the one to be used as the text, so the
Thanks, this works.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For
Note:
div class=labelSomething/div
div class=inputfieldinput type=text //div
div class=labelSomething2/div
div class=inputfieldinput type=text //div
..will create an invalid form: You MUST have a label linked to every
input element.
Here's a snippet from my own cake.generic.css:
/*
*