2010-03-17 9 views
1

Cela semble assez bizarre mais j'ai cette morue et je dois le convertir en case à cocher, avec les mêmes fonctionnalitésComment convertir un Sélectionnez pour un checkbox

<select onchange="document.getElementById('reasonDiv{$test->id}').style.display = ''; 
    document.getElementById('reason{$test->id}').value = this.value;" name='reasonId{$test->id}' id='reasonId{$test->id}'> 
    <option value=''>Test</option> 
    {foreach item=test from=$testtmp.6} 
     <input type="checkbox" value='{include file='testen.tpl' 
    blog=$test1 member=$test2 contents=$test->contents replyId=$test->predefinedreplyid }' label='{$test->predefinedreplyid}' 
    {if $test->predefinedreplyid==$test1->declineId}selected="selected"{/if}>{$test->subject}</option> 
    {/foreach} 
</select> 

Comment puis-je faire? Merci pour l'aide

Répondre

3
{foreach item=test from=$testtmp.6} 
     <input type="radio" name='reasonId{$test->id}' onClick="onchange="document.getElementById('reasonDiv{$test->id}').style.display = ''; 
    document.getElementById('reason{$test->id}').value = this.value;" type="checkbox" value='{include file='testen.tpl' 
    blog=$test1 member=$test2 contents=$test->contents replyId=$test->predefinedreplyid }' label='{$test->predefinedreplyid}' 
    {if $test->predefinedreplyid==$test1->declineId}selected="selected"{/if}>{$test->subject}/> 
    {/foreach} 

Je pense qu'il devrait faire l'affaire :)

+0

Yepp cela a fonctionné pour moi merci ont une belle journée – streetparade