Firstly, awesome module it has helped me strip out a lot of custom jquery!

However it would be even awesome-er if it fully supported grids. I can see it quite clearly says you can only use "select components" but if it also work with "Grids" it would cover a lot more use cases / UX improvements for webforms.

A couple of examples:

  • You have a rating grid with multiple rows with you typical "Strongly Agree", "Agree" etc... where users enters a negative value such as "Disagree" a new component pops up asking for comments for the row where the negatives were selected.
  • Alternatively I use it to score a wide range of criteria giving points from 1 - 5 on multiple rows, however there is a fail option. In the event a fail is selected it must pop up with a justification textarea for the row where fail was selected

I updated line 404 - 412 to include grid in the sql query. This seems to work as a select would but this is a blanket and applies to all rows. So as per the score example above if you have 3 rows and select the "fail" on any it will be triggered. I have no ability to trigger different conditional components for each row of the grid.

  if (!$new_component) {
    $baseComponent = _webform_conditional_get_base_component($nid, $cid);
    $sql = "SELECT name, form_key, type, extra,cid, weight,pid FROM {webform_component} WHERE nid = %d and pid <> %d and (type in ('select','pagebreak','fieldset', 'grid') OR cid = %d) order by weight ASC ";
  }
  else {
    $baseComponent['cid'] = '';
    $sql = "SELECT name, form_key, type, extra,cid, weight,pid FROM {webform_component} WHERE nid = %d  and type in ('select','pagebreak','fieldset','grid') order by weight ASC ";
  }

The above seems to work quite well and would be a nice feature in itself, however it would be nice to also support the values per row of the grid.

Hope I am explaining myself propperly!

Comments

tedbow’s picture

Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

Right now I am focusing on getting the existing functionality working. I will possibly add new features in a 2.x release.

It you could provide a patch and export of webform to test it on that would great.