{{navigation}}

<div class="ts_content">
  <div class="ts_content_inner">

  <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>
    {{if $group.group_name}}
      <h3>{{$group.group_name}}</h3>
    {{else}}
      <br />
    {{/if}}

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

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

  {{/foreach}}

  {{continue_block}}

  </form>
    
  </div>
</div>
