After update webform to 7.x-4.0-beta1 required field not work on webform_boolean fields. needs rename mandatory to required in module. patch attached.

Comments

tr33m4n’s picture

This does not seem to work with Webform 7.x-4.0-beta3. Any help?

Cheers

roderik de langen’s picture

StatusFileSize
new1.09 KB

fix for latest dev

cobadger’s picture

Status: Active » Reviewed & tested by the community

Patch #2 worked for me.

spadxiii’s picture

Status: Reviewed & tested by the community » Needs work

Patch works as in that a required-* is shown, but there is no validation error when the checkbox is not checked.

I'll see what I can come up with.

spadxiii’s picture

Status: Needs work » Needs review
StatusFileSize
new1.91 KB

Added an element validate to check for empty values when the field is required.

cobadger’s picture

Status: Needs review » Reviewed & tested by the community

Good catch @SpadXIII. Tested #5 and

  • the form element displays with asterisk and form-required class as expected, and
  • if left blank and set as a required field in the webform configuration, throws form_error indicating that the field is required
anybody’s picture

Confirming RTBC. Will this ever be part of a new release?