hello friends........ .. i am new to smarty. can anyone please tell me how to get the value from a dynamically generated checkbox using smarty. this is the code i used... here i am generating 10 checkbox. but i am not getting the value when each checkbox is checked. the value is coming from the array $profservices. how can i get the value from each checkbox when they are selected. also i have a "Select all" checkbox generated. how will i write its code. ie: how can i get all the checkbox dynamically generated selected when clicking the "select all"checkbox.
Thanks
Code:
{section name=ckbox loop=$profservices}
{if $smarty.section.ckbox.index==$profserv}
<tr><td>
<input type="checkbox" checked="checked" value="{$smarty.section.ckbox.index}" disabled="disabled" name="ckbx">{$profservices[ckbox]}</td></tr>
{/if}
{if $smarty.section.ckbox.index >='4' and $smarty.section.ckbox.index <='7'}
<tr><td><input type="checkbox" value="{$smarty.section.ckbox.index}" checked="checked" name="ckbx">{$profservices[ckbox]}</td></tr>
{/if}
{if $smarty.section.ckbox.index!=$profserv and $smarty.section.ckbox.index!='4' and $smarty.section.ckbox.index !='5' and $smarty.section.ckbox.index!='6' and $smarty.section.ckbox.index !='7'}
<tr><td><input type="checkbox" value="{$smarty.section.ckbox.index}" name="ckbx">{$profservices[$smarty.section.ckbox.index]}</td></tr>
{/if}
{/section}
Comment