CarlosC Posted October 29, 2012 Share Posted October 29, 2012 (edited) Hi, I what to add 5 input checkbox on authentication.tpl, reusing the field "Additional information". Line 537 on default theme, but not work. <p class="textarea"> <label for="other">{l s='Additional information'}</label> <div id="other_info"> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="other"> Info1<br> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="other"> Info2<br> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="other"> Info3<br> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="other"> Info4<br> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="other"> Info5<br> </div> </p> Original code: <p class="textarea"> <label for="other">{l s='Additional information'}</label> <textarea name="other" id="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{/if}</textarea> </p> Could someone give a hand? Best Regards Edited October 29, 2012 by carloscorp (see edit history) Link to comment Share on other sites More sharing options...
Valérie Assetskaya Posted October 29, 2012 Share Posted October 29, 2012 Hi, It is necessary to use radiobutton instead of checkbox, if you want to create input with the same name. If checkbox is necessary, so the names should be different other1, other2, etc Best regards. Link to comment Share on other sites More sharing options...
CarlosC Posted October 30, 2012 Author Share Posted October 30, 2012 Hi, Thanks for your response! I need use checkbox with multiple selection. I tried this way but did not work <label for="other">{l s='Additional information'}</label> <div id="other_info"> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="Info1"> Info1<br> <input type="checkbox" value="{if isset($smarty.post.other)}{$smarty.post.other}{/if}" id="other" name="Info2"> Info2<br> </div> Regards Link to comment Share on other sites More sharing options...
Valérie Assetskaya Posted October 30, 2012 Share Posted October 30, 2012 Hi, Please, give more details about what exactly is wrong. Like this it would be easier to identify the problem. Besides it is necesssary to use $smarty.post.Info1 and $smarty.post.Info2 instead of $smarty.post.other, as well, php code should be included. Best regards. Link to comment Share on other sites More sharing options...
CarlosC Posted November 1, 2012 Author Share Posted November 1, 2012 (edited) Hi, I tested many ways but not save the checkbox information. That info shows in BO, tab Clients -> Address -> Client Address -> field Other. My authentication.tpl file (Base on default theme): http://pastebin.com/5VgQHUHM Original one (PS 1.5.2): http://pastebin.com/4hN4C2y2 I want to convert the original textarea (default theme line 545) in same checkboxs (My theme line 537). And thank you so much for your help. Regards Edited November 1, 2012 by carloscorp (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts