1 つのページ内に異なる値を持つフォームはほとんどなく、これらのフォームの数はおそらく時間の経過とともに増加します。ここで、ユーザーがチェックボックス name="terms" を選択するまで、ユーザーがこれらのフォームを送信できないようにします。これは 1 つだけ表示され、それらのフォームのいずれにも配置されません。可能ですか、それともすべてのフォーム内に配置する必要がありますか?
<input type="checkbox" name="terms" /> Agree to terms and conditions.
<form action="./action/studentMentorSignup.php" method="post" name="studentsForm">
<input type="hidden" value="145" name="mentorID" />
<button class="btn btn-warning" type="submit" name="submitRequest"><i class="icon-check"></i></button>
<a href="#myModal10" role="button" data-toggle="modal" class="btn btn-info"><i class="icon-info-sign"></i></a>
</form>
<form action="./action/studentMentorSignup.php" method="post" name="studentsForm">
<input type="hidden" value="244" name="mentorID" />
<button class="btn btn-warning" type="submit" name="submitRequest"><i class="icon-check"></i></button>
<a href="#myModal11" role="button" data-toggle="modal" class="btn btn-info"><i class="icon-info-sign"></i></a>
</form>
<form action="./action/studentMentorSignup.php" method="post" name="studentsForm">
<input type="hidden" value="477" name="mentorID" />
<button class="btn btn-warning" type="submit" name="submitRequest"><i class="icon-check"></i></button>
<a href="#myModal11" role="button" data-toggle="modal" class="btn btn-info"><i class="icon-info-sign"></i></a>
</form>
……
手伝ってくれてありがとう。