There is a problem with this module in Webform 7.x-4.0, not sure about earlier versions of the Webform module. The problem is, while I'm able to set the Postal code as a required field, they are not required when people are filling out the form. So, it should be a required field, but people are able to fill out the form without putting any postal code at all in here.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pafla’s picture

How to fix this?

Helrunar’s picture

For a fast fix open webform_postal_code.module, find in Line 168

'#required' => $component['mandatory'],

and change with

'#required' => $component['required'],

because this has changed in Webform 7.x-4.x

Helrunar’s picture

Helrunar’s picture

Status: Needs work » Needs review
Joe Huggans’s picture

this worked for me, thanks !

dtarc’s picture

Status: Needs review » Reviewed & tested by the community

This worked for me too. Could we see it committed?

  • Mirabuck committed 56d26fa on 7.x-1.x
    Issue #2164223 by Helrunar: Fix for unable to make required field.
    
Mirabuck’s picture

Status: Reviewed & tested by the community » Fixed

Patch committed. Sorry for the excruciatingly long wait.

Status: Fixed » Closed (fixed)

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

ctrnz’s picture

Sorry to re-opening this. But does this mean for webform 3.x it will no longer work?

VanessaR’s picture

Hi!

@ctrnz I made a patch for webform 3.x. It fix the required attribut for postal code field.