With latest webform an input field of type email will not be triggered because the javascript is short circuited. Here is a patch to fix this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bfodeke’s picture

I was unable to get your patch to work, I had to do the following in order to get it to work.

<?php
if (!$field.length || !$field.is('input:text,input:password,input[type=email],textarea')){

?>

** edit **

Sorry, my solution is for the D7 version of this module, I don't know if it would help on D6

ksavoie’s picture

Had same issue, bfodeke's suggestion worked for me in D7.
Thanks!

iwuv’s picture

I'm having this issue on Drupal 6 with the 1.3 version. Email field is unaffected by the Javascript.

rtrubshaw’s picture

The maintainers of jQuery closed ticket #9132 with the status "wontfix" for various good reasons, so the patch as given (adding input:email pseudo-selector) won't work.

The suggestion by bfodeke is the one that the jQuery maintainer's endorse (AFAICT).

It may be worth adding input[type="other HTML5 input type"] for all the other HTML5 input types that render as textboxes

iwuv’s picture

I've confirmed that the code in post #1 by bfodeke fixes this issue in the 1.3 version of Compact Forms on Drupal 6.

Here's how to do it. Add "input[type=email]" (no quotes) to line 22 of compact_forms.js as shown in bfodeke's example. And you're done.

jorisx’s picture

Check post form #1 /#5 works perfect, also for D7
Can that be checkin for next release ?

:-)

ddorian’s picture

Post in #1 did it for me in d7.

ryanblyth’s picture

In D7 #1 works for me too, thanks bfodeke. Here is a D7 patch using the solution from #1.

ryanblyth’s picture

Use this patch instead of #8. Recreated patch to remove unnecessary style text.

joachim’s picture

Status: Needs review » Closed (duplicate)

This is a duplicate of #1459346: Email labels in Webform 3.16+ not processed by compact form, where there is also a patch.