{if !isset($show_name) or $show_name eq 'y'} {title url="tiki-take_survey.php?surveyId=$surveyId"}{$survey_info.name}{/title} {/if}
{wiki}{$survey_info.description}{/wiki}
{$pageCount=0} {section name=ix loop=$questions} {$questionId = 'question_'|cat:$questions[ix].questionId} {if empty($smarty.request.$questionId)}{$answer=''}{else}{$answer = $smarty.request.$questionId}{/if} {if $questions[ix].type eq 'h' and not empty($questions[ix].explode.0) and $questions[ix].explode.0 eq 'y'} {$pageCount=$pageCount+1} {/if} {$blockClass=' page'|cat:$pageCount}
{if $questions[ix].type eq 'h'} {$htag = (empty($questions[ix].explode.1)) ? 'h3' : $questions[ix].explode.1} <{$htag}>{$questions[ix].question|escape|nl2br}{if $questions[ix].mandatory eq 'y'} *{/if} {else}
{$questions[ix].question|escape|nl2br}{if $questions[ix].mandatory eq 'y'} *{/if}
{/if} {if $questions[ix].type eq 'c'}
{section name=jx loop=$questions[ix].qoptions} {/section}
{elseif $questions[ix].type eq 't'}
{if !empty($questions[ix].cols)} {assign var='textcols' value=$questions[ix].cols} {else} {assign var='textcols' value=80} {/if}
{elseif $questions[ix].type eq 'x'} {assign var='area' value=$questions[ix].questionId} {if $questions[ix].explode.0 > 0} {assign var='textrows' value=$questions[ix].explode.0} {else} {assign var='textrows' value=20} {/if} {if $questions[ix].explode.1 > 0} {assign var='textcols' value=$questions[ix].explode.1} {else} {assign var='textcols' value=80} {/if} {if !empty($questions[ix].explode.2)} {$showToolBars = ($questions[ix].explode.2 neq 'n')} {$commentToolBar = ($questions[ix].explode.2 eq 'c')?'y':'n'} {else} {$commentToolBar = 'n'} {/if}
{if $showToolBars}{toolbars area_id="question_$area" comments=$commentToolBar}{/if}
{elseif $questions[ix].type eq 'm'} {if empty($answer)}{$answer=[]}{/if}
{section name=jx loop=$questions[ix].qoptions} {/section}
{elseif $questions[ix].type eq 'r' or $questions[ix].type eq 's'}
{if $questions[ix].options} 1 {foreach from=$questions[ix].explode key=k item=j} {/foreach} {count($questions[ix].explode)} {elseif $questions[ix].type eq 'r'} 1 5 {elseif $questions[ix].type eq 's'} 1 10 {/if}
{elseif $questions[ix].type eq 'g'} {fgal_browse _id=$questions[ix].explode.0 show_selectall='n' show_infos='n' checkbox_label="{tr}Choose{/tr}" file_checkbox_name=$questionId} {/if}
{/section}