2012-02-10 10 views
0

ここでは、条件付きロジックをチェックボックスに使用する際に問題があります 私はchecked = trueまたはfalseを試していますが、条件に合致するためテンプレートの条件付きロジックが機能していない

<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}} /> 
のように働いてしまいました
関連する問題