Hi,

I'd like to put an inital value in my user post text field. I searched through the module file, and this particular batch of lines stood out to me as being the bunch that control the text field. (http://pastie.textmate.org/235503)

I added a line '#defaultvalue' => t('asdf') with still no luck..

Any suggestions please on how to add an initial value?

Thanks. Jon.

Comments

sun’s picture

Status: Active » Fixed

Well, the FAPI property is #default_value (note the underscore). However, you probably want to use JavaScript to remove that default value when a user wants to start typing...

Anyway, using the right property should work, and I don't see room for this being a module feature.

JonGirard-1’s picture

Thanks.. that worked great..

As for using the javascript to clear the textarea, in the same lines of code in the mod file I inserted '#attributes' => array ('onfocus' => "value = ''", 'onblur' => "value='Write Something Here..'"),

Thanks.

Jon

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.