{{navigation}}

<div class="ts_page_content">

<h2>{{$page_name}}</h2>

{{error_message}}

<form action="{{$page_url}}" method="post" enctype="multipart/form-data"
  id="ts_form_element_id" name="edit_submission_form">
  <input type="hidden" id="form_tools_published_form_id" value="{{$published_form_id}}" />
{{foreach from=$grouped_fields key=k item=curr_group name=row}}
  {{assign var=group value=$curr_group.group}}
  {{assign var=fields value=$curr_group.fields}}

  <a name="s{{$group.group_id}}"></a>
  <fieldset>
  {{if $group.group_name}}
    <legend>{{$group.group_name}}</legend>
  {{/if}}

  {{if $fields|@count > 0}}
  <table class="table_1" cellpadding="1" cellspacing="1" border="0" width="688">
  {{/if}}
    
  {{foreach from=$fields item=curr_field name=i}}
    <tr>
      <td width="180" valign="top" {{if $smarty.foreach.i.last}}class="rowN"{{/if}}>
        {{$curr_field.field_title}}
        <span class="req">{{if $curr_field.is_required}}*{{/if}}</span>
      </td>
      <td valign="top" {{if $smarty.foreach.i.last}}class="rowN"{{/if}}>
        {{edit_custom_field form_id=$form_id field_info=$curr_field field_types=$field_types
          settings=$settings submission_id=$submission_id}}
      </td>
    </tr>
  {{/foreach}}

  {{if $fields|@count > 0}}
    </table>  
  {{/if}}

  </fieldset>

{{/foreach}}

{{continue_block}}

</form>
  
</div>
