2012-02-10 33 views
0

这里是使用条件逻辑复选框 一些问题,我尝试检查=真或假,但它不工作,在那里我选择模板条件逻辑,我想检查=“检查”匹配条件模板条件逻辑是行不通的

<table border="1"> 
    <thead> 
    <tr> 
     <th>Department Name</th> 
     <th>Test Name</th> 
     <th>Sub Test Name</th> 
    </tr> 
    </thead> 
    <tbody> 
    {#foreach $T.d as post} 
    <tr> 
     <td>{$T.post.Dep_Name}</td> 
     <td>{$T.post.Test_Name}</td> 
     <td>{$T.post.Sub_Test_Name}</td> 

     <td> 
     {{if $T.post.Status==Checked}} 
     <input id="chkResult" type="checkbox" checked="checked" /> 
     {{/if}} 
     <input id="chkResult" type="checkbox" /> 
     </td> 
     <td><input id="Button2" type="button" value="button" /></td> 

    </tr> 
    {#/for} 
    </tbody> 
</table> 

回答

0

尝试使用类似这样

<input id="chkBox" type="checkbox" 
     {{if account.checkImage}} checked="checked"{{/if}} /> 

您需要修改逻辑{{如果}}像

东西

猜你检查的条件是一个字符串。 让我知道如果你仍然面临的任何问题。

0

我得到它的工作是这样

<input type="checkbox" id="chk${FeeSettingDetailID}" {{if IsRefundable}} checked{{/if}} />