{* Should be included and past the variables 'custom_fields' (an array of custom fields) and 'form_type' which should be either 'anonymous' or 'report' *} {section name="i" loop=$custom_fields} {assign var='fld_id' value=$custom_fields[i].fld_id} {assign var="custom_field_id" value=$custom_fields[i].fld_id} {if $form_type == 'report'} {assign var="cf_required" value=$custom_fields[i].fld_report_form_required} {elseif $form_type == 'anonymous'} {assign var="cf_required" value=$custom_fields[i].fld_anonymous_form_required} {elseif $form_type == 'close'} {assign var="cf_required" value=$custom_fields[i].fld_close_form_required} {/if}