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?

CommentFileSizeAuthor
#4 compact_forms-HEAD.textarea.patch1.23 KBsun

Comments

agence web coheractio’s picture

Same issue
Subscribing

sun’s picture

Title: textarea fields not working » Add support for textareas
Version: 6.x-1.2 » 6.x-1.x-dev
Category: bug » feature

As far as I can tell from the code, textareas were never supported.

However, adding support for them might be doable. Patches are welcome.

agence web coheractio’s picture

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

sun’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

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.

agence web coheractio’s picture

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

sun’s picture

Status: Needs review » Fixed

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.

Status: Fixed » Closed (fixed)

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