1
<div id="mobilformbundle_customer_questionnaires_questionnaires">
<div class="checkbox">
<label class=""><input checked="checked" id="mobilformbundle_customer_questionnaires_questionnaires_4" name="mobilformbundle_customer_questionnaires[questionnaires][]"
type="checkbox" value="4"> questionnaire1</label>
</div>
<div class="checkbox">
<label class=""><input checked="checked" id="mobilformbundle_customer_questionnaires_questionnaires_5" name="mobilformbundle_customer_questionnaires[questionnaires][]"
type="checkbox" value="5"> questionnaire2</label>
</div>
<div class="checkbox">
<label class=""><input checked="checked" id="mobilformbundle_customer_questionnaires_questionnaires_6" name="mobilformbundle_customer_questionnaires[questionnaires][]"
type="checkbox" value="6"> questionnaire3</label>
</div>
<div class="checkbox">
<label class=""><input id="mobilformbundle_customer_questionnaires_questionnaires_10" name="mobilformbundle_customer_questionnaires[questionnaires][]"
type="checkbox" value="10"> generic questionnaire</label>
</div>
</div>
あなたが見ることができるように最初の3つのボックスがチェックされます(HTML属性checked
の値はchecked
です)。
;test 0: with value=4 checked=checked should be=1 mobilformbundle_customer_questionnaires_questionnaires_4
;test 1: with value=5 checked= should be=1 mobilformbundle_customer_questionnaires_questionnaires_5
Expected :'checked'
Actual :''
$checked
PHP変数が空である理由を私は理解していない:
は、ここに私のテストの出力です。それにはchecked
が含まれている必要があります。
ループに何らかのエラーがありますか?
ループは私によく見えます。やや奇妙なええ? – jaswrks