{{ $p := .Posts }}
<form class="create" method="POST" enctype="multipart/form-data">
  <div>
    <label for="url">url</label>
    <input type="text" name="url" id="url" 
    {{- if and $p (index $p 0).Post.URL.IsValid }} value="{{(index $p 0).Post.URL.String}}"
    {{- else if .SubmitURL }} value="{{ .SubmitURL}}"{{end -}}
    >
    <input type="file" name="file" accept="image/*">
  </div>
  <div>
    <label class="required" for="title">title</label>
    <textarea required name="name" id="title">{{ if $p }}