{{navigation}}

{{form_builder_edit_link}}

<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|upper}}</h3>
  {{else}}
    <br />
  {{/if}}

  {{foreach from=$fields item=curr_field}}
    <ul class="ts_field">
      <li class="ts_field_label">
        {{$curr_field.field_title}}
        <span class="req">{{if $curr_field.is_required}}*{{/if}}</span>
      </li>
      <li>
        {{edit_custom_field form_id=$form_id field_info=$curr_field field_types=$field_types
          settings=$settings submission_id=$submission_id}}
      </li>
    </ul>
  {{/foreach}}

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

{{continue_block}}
    
</form>