Location: PHPKode > projects > @1 File Store > templates/form.tpl
<form action="{$form.action|default:''}" method="{$form.method|default:get}"{if $form.enctype} enctype="{$form.enctype}"{/if}>
{if $form.errorcount}
 <p class="err">{$lang.there_is_an_error}
{if $form.message!=""}
: {$form.message}
 {/if}
 </p>
 {/if}
<table>
{foreach key="name" item="attrib" from=$form.fields}
<tr><td valign="top">{$attrib.description}:</td>
<td valign="top">
 {if $form.readonly}
  {$attrib.value}
 {else}
  {if $name=="login"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" class="loginuser" size=15>

  {elseif $name=="password" || $name=="password2"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" size=15 class="password">

  {elseif $name=="email"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" size=35 class="email">

  {elseif $name=="telephone"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" size=17 class="telephone">

  {elseif $name=="city" || $name=="state" || $name=="postcode" || $name=="country" || $name=="telephone" || $name=="email"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" size=20>

  {elseif $attrib.type=="text"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" size=50>

  {elseif $attrib.type=="file"}
   <input type="{$attrib.type}" name="{$name}" value="{$attrib.value}" size=50>

  {elseif $attrib.type=="textarea"}
   <textarea name="{$name}" cols="50" rows="5">{$attrib.value}</textarea>

  {elseif $attrib.type=="select"}
   {html_options name="`$name`" selected="`$attrib.value`" options="`$attrib.extra`"} <br />
   {$attrib.comment}

  {else}
  {/if}
 {/if}
</td></tr>
{if $attrib.iserror}
<tr><td colspan="2"><sup class="err">{$attrib.error}</td></tr>
{/if}
{/foreach}
<tr><td colspan="2" align="center"><input type="submit" value="{$form.submit}"></td></tr>
</table>
{if $form.hidden_fields && count($form.hidden_fields)>0}
{foreach key="hname" item="hvalue" from=$form.hidden_fields}
<input type="hidden" name="{$hname}" value="{$hvalue}">
{/foreach}
{/if}
</form>
Return current item: @1 File Store