Hi,

I'm a completely new user of Drupal and of Webform, and I do hope this is not a duplicate. I have looked in several places and could not find whether the following request has already been made.

I am trying to create a field which would correspond to a semantic differential scale. This type of evaluation requires and uses the same features as the grid in the webform, with the notable difference that the "question" is in fact a set of two words, one at each end of the scale.

E.g. «How would you describe this drink?»

Bitter 0 0 0 0 0 0 Sweet
Not refreshing at all 0 0 0 0 0 0 Very refreshing

etc.

Is there anything I missed, a workaround or a part of the module?

Thanks for your help,

X_GoMad

Comments

quicksketch’s picture

Hm, indeed. This looks very similar to a grid but with a slight twist. Webform doesn't have any ability to do this currently, though with enough theming you could probably use the existing grid component to emulate such a display. Or alternatively you could use different sets of radio buttons and theme them together also. I'm not really sure which would be easier because neither lines up exactly with what you need. What would the stored values of your radio buttons be for statistical purposes? -2 through +2?

x_GoMad’s picture

Well that's one aspect I hadn't considered yet, the values. This type of scale (-n through n, with or without a zero point) would be ideal indeed.

As for some kind of workaround, I've themed the grid a bit and have come to the following result:

- I created a normal grid, and with css defined it as a floating element (left) with a reduced width (50%) and an invisible header.
- Then I added a markup element, i.e. a table with css properties similar to the grid (even and odd rows, floating left and a reduced width), so it sticks to the grid and emulates the right end of it.
- Finally I added a horizontal line element, in order to clear the floating property.

It does emulate the kind of table I'm after, but has two drawbacks.

- Not taking into account the compatibility issues between the various browsers, the accessibility factor is low (e.g. I suspect a reader would read first the full grid, then the 'bolt-on' table).

- I can't use the 'random question' parameter, which is a shame, as it's a good device against the problem of statistical learning.

I'm afraid that I could hardly do more than this, as far as my knowledge of css/php is concerned. So if anyone has a clean(er) answer to this, please let me know...

Thanks again,

XgM

x_GoMad’s picture

Issue summary: View changes

(Did I just send the message by clicking «save»? I hadn't put the «thank yous» section).

quicksketch’s picture

Issue summary: View changes
Related issues: +#1961398: Feature for grid field type
quicksketch’s picture

Version: 6.x-3.15 » 7.x-4.x-dev

Let's move this to the 4.x issue queue. I think we've had a few duplicate requests for this recently.

quicksketch’s picture

Title: Semantic differential scale with grid. » Make Grid component support Polarization/Semantic-differential scale
Related issues: +#2233919: Webform component in Polarization style

Expanding title for search-ability. Marked #2233919: Webform component in Polarization style duplicate.

RSchieferdecker’s picture

Hi,

please find a patch of the grid component here: https://drupal.org/node/2233919

Regards
Richard

quicksketch’s picture

Status: Active » Needs review
StatusFileSize
new5.14 KB

Thanks @RSchieferdecker! I've converted this changed grid.inc file into a patch file so I can review the changes. It looks like @traxer modified the 3.x version of the module, which is fine, but all new features for Webform are going into the 4.x branch of the project. I'm not sure this patch will apply to the 4.x version yet but it shouldn't be too hard to convert it if necessary.

I have yet to review the changes, though overall the approach looks promising.

danchadwick’s picture

Cross post from the duplicate topic. My apologies -- typed into the wrong browser tab.

I do something similar, but I have a value for each option. So to take the bitterness example, I might have:

BITTERNESS: "Raw Endive", "Espresso", "Tonic Water", "Pink Grapefruit", "Water"

These are presented via tittle attributes as hover-over pop-up hints (like tool-tips). My particular use case is to rate skills. It solves the problem of the user "guessing" what value should be given by providing specific criteria. Actual testing has shown that the scale significantly lowers the standard deviation of the answers -- i.e. gives more precise results.

So the format would be:

question_key|left title|right title|tip 1|tip 2|tip 3| ...

Note that I'm calling the left and right labels "titles", rather than values. They aren't values, as those are defined elsewhere (the column headings).

A similar change can be made to the values definition.

Status: Needs review » Needs work

The last submitted patch, 7: grid_polar-2233919.patch, failed testing.

danchadwick’s picture

Status: Needs work » Fixed
StatusFileSize
new7.71 KB

I pushed this patch to completion, including:

  1. Improved descriptions for options and questions
  2. Simplified the theming by detecting the second column ahead of time.
  3. Display of right-side headers in plain text table results, and export headers.

I think this is a nice feature.

Committed to 7.x-4.x and 8.x.

  • DanChadwick committed daa35e5 on 8.x-4.x
    Issue #1456496 by quicksketch, x_GoMad, DanChadwick: Make grid component...

  • DanChadwick committed ff928df on
    Issue #1456496 by quicksketch, x_GoMad, DanChadwick: Make grid component...

Status: Fixed » Closed (fixed)

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