Skip to content

Fixed display of grid submissions

theo lem requested to merge fix-grid-display into master

Fixes #12 (closed) by patching webform.

Problem description

When a submission is saved for a webform containing "grid" components, an empty grid line (ie. the user didn't answer a grid row), the first option is assigned to this row on single-submission display (on site.tdl/node/{nid}/submission/{sid}).

Example : in the following picture, "question un" wasn't answered.

image

This is due to bad usage of in_array : since in PHP NULL is equivalent to 0, the submission was assigned to the 0-indexed option, hence the first option of the row.

What this MR does

Adding a !isset() in the check to avoid interpreting NULL as 0-indexed option.

TODO

  • report upstream
  • CHANGELOG
Edited by theo lem

Merge request reports