I couldn't figure out for the life of me why setting the size for my form
fields wasn't working...until I read your note about the default CSS. (new
to cakephp)
THANKS!
grigri wrote:
>
>
> dude...
>
> echo $form->input('Foo.bar', array('type' => 'text', 'length' => 10));
>
> ...not exactl
Use size in the options array,
This is an example for input type text:
$form->input('Model.field', array('type'=>'text','size' => '50',
'maxlength'=>'255'));
On Feb 22, 6:01 am, "Doug @ Straw Dogs" <[EMAIL PROTECTED]>
wrote:
> I'm a bit suprised to find that the input method of the form helper
>
Have you tried setting 'maxlength' in the options array?
On Fri, Feb 22, 2008 at 9:01 AM, Doug @ Straw Dogs
<[EMAIL PROTECTED]> wrote:
>
> I'm a bit suprised to find that the input method of the form helper
> doesn't have a size attribute.
>
> Am I missing it or do I need to hack it in myself?
erm, sorry, I meant :
echo $form->input('Foo.bar', array('type' => 'text', 'size' => 10));
On Feb 22, 11:12 am, grigri <[EMAIL PROTECTED]> wrote:
> dude...
>
> echo $form->input('Foo.bar', array('type' => 'text', 'length' => 10));
>
> ...not exactly rocket science
>
> [note that the default cake
dude...
echo $form->input('Foo.bar', array('type' => 'text', 'length' => 10));
...not exactly rocket science
[note that the default cake css defines all text inputs as having
width 100%, so if you don't change that then the physical width of the
textbox will not depend on the size attribute]
O
I'm a bit suprised to find that the input method of the form helper
doesn't have a size attribute.
Am I missing it or do I need to hack it in myself?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.