forms icon indicating copy to clipboard operation
forms copied to clipboard

feat: introduce Grid as a new question type

Open Koc opened this issue 2 months ago • 8 comments

Closes #2606

:construction: Development still in progress. This is reopening of the #2924 but pushed to upstream instead of my fork.

I'm trying to reuse already existent Option entity and corresponding UI components by adding extra column optionType=row|column. Why?

  • as rows/columns can be renamed - we need to store their ids. So I've just reused already existent mechanism
  • we should have possibility to reorder rows/columns. Already existent UI components for options allow us to do that

:heavy_check_mark: Implemented

:mag: Various input types

Radio image

Checkbox image

Number image

:mag: Question management

Create new field with nested select menu image image

Manage rows and columns image

:mag: Results storing and rendering

Responses view image

Summary view image

image
:mag: Export support

image image

:spiral_notepad: Todo

  • [x] Improve summary view
  • [x] Export support
  • [x] Tests

Koc avatar Oct 03 '25 11:10 Koc

@nimishavijay @jancborchardt please suggest how to display results summary

image

I guess we can show table with counters for radio/checkbox grid cell type. But what to do for a number/text values?

FYI @nimishavijay I've applied almost all of your suggestions. Please check or even feel free to commit to my branch

Also does anybody know how to export this type of the question to xlsx files?

Koc avatar Oct 13 '25 23:10 Koc

But what to do for a number/text values?

@Koc I'm still against allowing free text answers for the grid questions. It makes things much more complex than needed and I didn't see any other form solution providing this.

Chartman123 avatar Oct 14 '25 06:10 Chartman123

@Chartman123 I agree that free text answers is indeed can be an overkill and it will be removed.

But worth to mention that the main reason I started working on the Grid field type is our need to collect numeric values in matrix form. I've added checkboxes and radios to make it more universal, but without numeric input, the field would have no real value for our use cases.

We are using that for resource allocation tables, workload estimations, etc

Koc avatar Oct 26 '25 10:10 Koc

@koc what seems fitting is a heatmap of sorts, showing the grid, with the numerical counts, but also a visual support to show how much it is compared to the others.

E.g. circles of differing sizes, or bars, or hues of the primary color, going from color-main-background for no one having voted to color-primary for 100% having voted for that option out of the 5 on that row.

Have you also checked how others like Google Forms do it?

jancborchardt avatar Oct 27 '25 15:10 jancborchardt

Google forms not supports input number, but here is their "summary" representation and excel exporting:

image image image

Koc avatar Oct 27 '25 17:10 Koc

hey mates!

I've decided to make it little bit simpler for a 1st iteration (without gradients/extra libraries for charts).

Few updates:

  • Removed text input type
  • Summary view
    • for checkbox and radio we can calculate percentage
    • for number grid we calculate average value (in theory later we can calculate median, min/max, percentile 95, etc)
  • Export
    • added support for numbers: grid question adds multiple columns (rows * columns)
  • Actualized all screenshots

What's next? In general everything works. I can start work on tests if you fine with implemented functionality

Koc avatar Nov 16 '25 15:11 Koc

BTW we have green pipeline :point_right: :point_left:

Koc avatar Nov 20 '25 19:11 Koc