Closed (fixed)
Project:
Webform Bonus Pack
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2011 at 15:26 UTC
Updated:
18 Jan 2012 at 13:50 UTC
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
Comment #1
dealancer commentedCommited 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.
Comment #2
dealancer commentedHave ported this patch back to 6.x-3.x, see http://drupalcode.org/project/webform_bonus.git/commitdiff/f6905f3002180....
Comment #3
dealancer commentedCurrently 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.
Comment #4
dealancer commentedIssue a) will be solved automatically when b) is done.
Comment #5
dealancer commentedFixed those issues.
Comment #6
jeremymcminn commentedHi 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!!
Comment #7
jeremymcminn commentedNot 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
Comment #8
dealancer commentedI think we could add checkbox to hide field that is empty or empty and conditional.
Comment #9
jeremymcminn commentedHi dealancer, thanks for replying. Yes I think that is a good idea - any ideas on how I could go about implementing that?
Comment #10
dealancer commentedWell, 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.
Comment #11
jeremymcminn commentedI 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.
Comment #12
jeremymcminn commentedThis 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)
Comment #13
dealancer commentedLooking forward for a patch, hope it could be fixed.
Comment #14
dealancer commentedNow fixed bug with order of summary component and display of it's title.
Comment #15
arebos commentedi think it has to be in webform core component
Comment #16
dealancer commentedComment #17.0
(not verified) commentedUpdating