Skip to content

Instantly share code, notes, and snippets.

@fleeting
Created December 3, 2010 22:23
Show Gist options
  • Save fleeting/727650 to your computer and use it in GitHub Desktop.
Save fleeting/727650 to your computer and use it in GitHub Desktop.
{foreach from=$aListFields item=aListField}
<label>{if $aListField.req == 1}*{/if}{$aListField.name}</label><br />
{if $aListField.field_type == "text" || $aListField.field_type == "email" || $aListField.field_type == "url" || $aListField.field_type == "phone" || $aListField.field_type == "address" || $aListField.field_type == "number"}
<input type="text" name="{$aListField.tag}" value="{if !empty($aMember.merges.{$aListField.tag})}{$aMember.merges.{$aListField.tag}}{else}{$aListField.default}{/if}"><br />
{elseif $aListField.field_type == "radio"}
{foreach from=$aListField.choices item=aChoice}
<input type="radio" name="{$aListField.tag}" value="{$aChoice}"> {$aChoice}<br />
{/foreach}
{elseif $aListField.field_type == "dropdown"}
<select name="{$aListField.tag}">
{foreach from=$aListField.choices item=aChoices}
<option value="{$aChoice}">{$aChoice}</option>
{/foreach}
</select><br />
{/if}
{/foreach}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment