Idea started here http://drupal.org/node/435232. There is already a patch that adds new summary component for D6 version of Webform, however it still needed to be improved: using native webform rendering system, rather then implementing it again. Also this should be done for D7.

Comments

dealancer’s picture

Commited to branch to 7.x-3.x, see http://drupalcode.org/project/webform_bonus.git/commitdiff/3fbfcc382c507...

Now I am porting this to 6.x-3.x.

dealancer’s picture

dealancer’s picture

Currently there is a few bugs:

a) Click Next page, then click Previous page, then again click Next page and see notice.
b) All components now are shown in summary. We need to find a way how to enable/disable components for the summary view and implement this.

dealancer’s picture

Issue a) will be solved automatically when b) is done.

dealancer’s picture

Fixed those issues.

jeremymcminn’s picture

Hi dealancer - great work, just wondering if you would know how to hide components that havent been answered? i.e. with usage of webform conditional, a question may not have shown up and be answered and thus will not be displayed, however if the question does show up at some point in the webform and the user answers it, the component will need to be selected in the summary to be shown and therefore will always show whether it has been answered or not?

Basically I need the option for all components to be shown, but only those that are filled in as I have a webform with about 10 conditional questions of similar content and it looks weird in the summary to have these 10 questions one after another with only one filled in.

Any help here would be much appreciated!!

jeremymcminn’s picture

Not sure why it says I have revised one of the comments above, not sure how that happened. Any help on my issue above would be very very appreciated.

JF

dealancer’s picture

I think we could add checkbox to hide field that is empty or empty and conditional.

jeremymcminn’s picture

Hi dealancer, thanks for replying. Yes I think that is a good idea - any ideas on how I could go about implementing that?

dealancer’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Active » Needs work

Well, it could be done here http://drupalcode.org/project/webform_bonus.git/blob/refs/heads/7.x-3.x:.... - this file is for 7.x-3.x, there is similar one for 6.x-3.x.

1) add new bool option to extra http://drupalcode.org/project/webform_bonus.git/blob/refs/heads/7.x-3.x:...
2) add new checkbox to the form http://drupalcode.org/project/webform_bonus.git/blob/refs/heads/7.x-3.x:...
3) Exclude fields that are empty if checkbox is set. You can make it somewhere in this function http://drupalcode.org/project/webform_bonus.git/blob/refs/heads/7.x-3.x:...

Then post your patch here.

jeremymcminn’s picture

I didnt add the checkbox, but this code seems to hide fields that are empty (including conditional fields)

if(empty($submitted[$key])) {
unset($node->webform['components'][$key]);
}

Thanks for your help - someone else may want to use this I am not sure, I dont know how to add the checkbox, but this works for what I need it for.

jeremymcminn’s picture

This works - to a degree. FOr some reason, fields that are filled in but are conditional seem to show up on the summary and then disappear (but not all conditional fields)

dealancer’s picture

Looking forward for a patch, hope it could be fixed.

dealancer’s picture

Now fixed bug with order of summary component and display of it's title.

arebos’s picture

i think it has to be in webform core component

dealancer’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updating