Created a quiz webform using webform and webform score elements. However the webform multi select elements gives the validation error but the webform score module elemenst don't give the validation errors if the user selects more than the allowed number of values while submitting the form.

Steps to reproduce

  • Install the webform score module as usual.
  • Build a webform using webform and webform score elements.
  • Create a page element and add the webform score under this page.
  • Use webform score multi-select element like checkboxes etc.
  • Create another page element and add webform multi-select element like checkboxes under this page.
  • Set "Allowed number of values" to limited (2, 3 etc) for both the checkboxes
  • Provide the custom error message if the user selects more than the allowed values.
  • Go to the form and try to select more than allowed values for both of these checkboxes. You will notice that core webform element gives the error while webform score element (checkbox) does not give any error.

Proposed resolution

I am providing a simple patch for the issue.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3165614-validation.patch507 bytessanju1092101

Comments

sanju1092101 created an issue. See original summary.

sanju1092101’s picture

StatusFileSize
new507 bytes
sanju1092101’s picture

sahil432’s picture

Status: Active » Reviewed & tested by the community

I have tested this patch and working fine.

nigelcunningham’s picture

Status: Reviewed & tested by the community » Fixed

This patch was applied via another issue, thanks.

Status: Fixed » Closed (fixed)

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