views:

36

answers:

1

That sounds pretty odd but i have this cod and i need to convert it to checkbox, with the same functionalities

 <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>

How can i do that? Thanks for help

+3  A: 
  {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}

I think it should do the trick :)

remi bourgarel
Yepp this worked for me thanks have a nice day
streetparade