Add support for textareas
bjalford - July 18, 2009 - 08:30
| Project: | Compact Forms |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Using webform, all the other fields work fine but not text area.
See (message field): http://www.supermoves.co.uk/drupal/contact
Has anyone else had this issue?

#1
Same issue
Subscribing
#2
As far as I can tell from the code, textareas were never supported.
However, adding support for them might be doable. Patches are welcome.
#3
Hi
The following fix works for me :
compact_forms.js (line 17)
change
if ($field.attr('type') != 'text' && $field.attr('type') != 'password') {into
if ($field.attr('type') != 'text' && $field.attr('type') != 'textarea' && $field.attr('type') != 'password') {Regards
Laurent
#4
Sorry, I'd be really surprised when that works, because that's a bit nonsense.
$field.attr('type') != 'text'checks for the HTML attribute "type". Textareas do not have a "type" attribute. Instead, they are TEXTAREA elements and not INPUT elements.Please test attached patch.
#5
Hi Sun
Your patch is also working fine.
Mine is working because a textarea is considered as text type (see 'Attributes' section in http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID...).
Thanks
Laurent
#6
Thanks for reporting, reviewing, and testing! Committed to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.