--- printablesurvey.php.org 2011-07-05 07:46:51.000000000 +0200 +++ printablesurvey.php.donated 2011-08-18 11:31:56.000000000 +0200 @@ -389,6 +389,9 @@ ,'QUESTIONS' => '' // templated formatted content if $question is appended to this at the end of processing each question. ); + // A group can have only hidden questions. In that case you don't want to see the group's header/description either. + $group_has_visible_questions = 0; + if(isset($_POST['printableexport'])){$pdf->titleintopdf($degrow['group_name'],$degrow['description']);} @@ -413,6 +416,8 @@ { continue; } + $group_has_visible_questions = 1; + //GET ANY CONDITIONS THAT APPLY TO THIS QUESTION $printablesurveyoutput = ''; @@ -1829,7 +1834,10 @@ $group['QUESTIONS'] .= populate_template( 'question' , $question); } - $survey_output['GROUPS'] .= populate_template( 'group' , $group ); + if ($group_has_visible_questions) + { + $survey_output['GROUPS'] .= populate_template( 'group' , $group ); + } } $survey_output['THEREAREXQUESTIONS'] = str_replace( '{NUMBEROFQUESTIONS}' , $total_questions , $clang->gT('There are {NUMBEROFQUESTIONS} questions in this survey'));