Hi,
Resizable Body module ( http://drupal.org/project/resizable_body ) allows body fields and comment fields to expand beautifully while user types in the textarea (very similar to the Facebook effect, which would be perfect and very practical if Privatemsg textarea would behave in such a way too).
The js that is responsible for such a beautiful and practical effect is called autoresize.js and is located inside the Resizable Body directory.
However, the resizable body module does not work for all the forms - you have to go to each content type and configure it on ad-hoc basis. So it does not offer support for Privatemsg forms. The module that makes ALL forms in Drupal to autoexpand (including privatemsg and contact forms) is another similar module called Textarea Expander http://drupal.org/project/textarea_expander, with an all-encompassing
function textarea_expander_process_textarea($element) {
if ($element['#resizable'] == TRUE) {
$element['#rows'] = 10;
drupal_add_js(drupal_get_path('module', 'textarea_expander') .'/textarea_expander.js', 'module', 'header');
}
return $element;
}
but unfortunately it's javascript effect is nowhere as beautiful as as that of the Resizable Body.
So, I'm wondering: how can we make Private message textareas to auto-expand as they do with Resizable Body module? Is there a way to call the autoresize.js from Resizable Body into the Privatemessage textarea, and, thus, to integrate the 2 modules?
Comments
Comment #1
berdirI would say that resizable_body module should provide the integration here, unless it provides some sort of api/which allows other modules to integrate their forms.
For reference, the body field is called $form['privatemsg']['body'] (note that the ['privatemsg'] part will soon be removed in the 2.x-branch) and the form is called privatemsg_new, see also http://blog.worldempire.ch/api/function/privatemsg_new/1
Comment #2
avpadernoI am closing this issue, since Drupal 4.x, 5.x, and 6.x are now not supported.