<div id="content">
  <table cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <td width="180" valign="top">
      <div id="left_nav">
        {{navigation}}
      </div>
    </td>
    <td valign="top">
      <div style="width:740px">
        <div class="title margin_bottom_large">{{$page_name}}</div>

        {{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}}
        <div class="subtitle underline margin_bottom_large">{{$group.group_name|upper}}</div>
        {{/if}}

        {{if $fields|@count > 0}}
        <table class="list_table margin_bottom_large" cellpadding="1" cellspacing="1" 
          border="0" width="688">
        {{/if}}
    
        {{foreach from=$fields item=curr_field name=i}}
          {{assign var=field_id value=$curr_field.field_id}}
          <tr>
            <td width="180" valign="top" class="pad_left_small">
              {{$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}}

      {{/foreach}}

      {{continue_block}}

      </form>

      </div>
    </td>
  </tr>
  </table>
</div>
