2012-02-10 9 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}} />