Re: How to set the default value of a textarea?

2007-12-19 Thread peterhf

Thanks for the reply. I am using 1.1.13.4450. I tried setting 'value'
=> 'something' in the html attributes array and it worked. Apparently,
I had done something wrong before.

Peter -

On Dec 18, 5:05 pm, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> On Dec 18, 2007 9:30 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > In an html textarea object, the default value is set between the begin
> > tag and the end tag, i.e. default value. How does
> > one set the default value of $html->textarea(...)? $html->extarea()
> > does not recognize a 'value' attribute in the html attribute array.
>
> Peter,
>
> What version of Cake are you using? At least on 1.1.15, inside the
> textarea() function in the libs/view/helpers/html.php file, if you set the
> 'value' key in the $htmlAttributes array, it should be set as the value
> between the textarea tags (unless you've created a app/config/tags.ini.php
> file in which case you'd need to make sure the last %s is between the
> textarea tags)
>
> - Gonzalo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to set the default value of a textarea?

2007-12-19 Thread Adam Royle

One thing to look out for... (at least with 1.2)

You have two options for setting a default value using the htmlhelper
params array

// value will always be set to 'mytext'
array('value' => 'mytext');

// value will be 'mytext' ONLY if the field is not set in $this-
>data[...]
array('default' => 'mytext');

Cheers,
Adam

On Dec 19, 11:05 am, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> On Dec 18, 2007 9:30 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > In an html textarea object, the default value is set between the begin
> > tag and the end tag, i.e. default value. How does
> > one set the default value of $html->textarea(...)? $html->extarea()
> > does not recognize a 'value' attribute in the html attribute array.
>
> Peter,
>
> What version of Cake are you using? At least on 1.1.15, inside the
> textarea() function in the libs/view/helpers/html.php file, if you set the
> 'value' key in the $htmlAttributes array, it should be set as the value
> between the textarea tags (unless you've created a app/config/tags.ini.php
> file in which case you'd need to make sure the last %s is between the
> textarea tags)
>
> - Gonzalo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to set the default value of a textarea?

2007-12-18 Thread Gonzalo Servat
On Dec 18, 2007 9:30 PM, peterhf <[EMAIL PROTECTED]> wrote:

>
> In an html textarea object, the default value is set between the begin
> tag and the end tag, i.e. default value. How does
> one set the default value of $html->textarea(...)? $html->extarea()
> does not recognize a 'value' attribute in the html attribute array.
>

Peter,

What version of Cake are you using? At least on 1.1.15, inside the
textarea() function in the libs/view/helpers/html.php file, if you set the
'value' key in the $htmlAttributes array, it should be set as the value
between the textarea tags (unless you've created a app/config/tags.ini.php
file in which case you'd need to make sure the last %s is between the
textarea tags)

- Gonzalo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to set the default value of a textarea?

2007-12-18 Thread peterhf

In an html textarea object, the default value is set between the begin
tag and the end tag, i.e. default value. How does
one set the default value of $html->textarea(...)? $html->extarea()
does not recognize a 'value' attribute in the html attribute array.

Thanks in advance for all suggestions.

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---