2016-01-18 27 views
0

這是填補在線測試的空白。所以我需要填寫所有的文本框。如何驗證所有文本框?

Demo

<form action="" method="post" id="question_form" class="cmxform" enctype="multipart/form-data"> 
     <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="4" required="true" > 
     <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="5" required="true" > 
     <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24" id="6" required="true" > 

+0

[使用不同的名稱(http://jsfiddle.net/NfcxX/192 /) – Tushar

+0

@Tushar:是的它的正確..但這是羣體問題...所以我需要同一個名稱的問題。任何其他方式來驗證? – Logz

+1

找到更新的提琴[這裏](http://jsfiddle.net/NfcxX/203/) – Akshay

回答

0

名必須具有獨特的價值,使用name作爲數組,試試這個

<form action="" method="post" id="question_form" class="cmxform" enctype="multipart/form-data"> 
    <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24[0]" id="4" required="true" > 
    <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24[1]" id="5" required="true" > 
    <input type="text" class="form-control fillblank boxes" placeholder="Type Here" name="24[2]" id="6" required="true" >