Antwort #1 am: 21. Oktober 2010, 10:19:32
Hi, in Deinem Quelltext wird jeder Input als erster ausgegeben.
So wie es aussieht funktioniert der $count++ Zähler nicht, somit werden dann alle als "checked" markiert damit wird das letzte ausgewählt.
Bitte probiere mal meine folgende Variante.
Suche:
<div align="center"> {php}$count++;
if ($count==1) {
{/php}
<input type="radio" name="id[{$options_data.ID}]" value="{$item_data.ID}" checked="checked" onClick="updatePrice()" />
{php}
} else {
{/php}
<input type="radio" name="id[{$options_data.ID}]" value="{$item_data.ID}" onClick="updatePrice()" />
{php}
}
{/php}</div>
Ersetze mit:
<div align="center">
<input type="radio" name="id[{$options_data.ID}]" value="{$item_data.ID}"{if $item_data.ID=='1'} checked="checked"{/if} onClick="updatePrice()" />
</div>
Gruß h-h-h