デフォルトで 1 つのチェックボックスで一連のテキスト ボックスをロック/ロック解除しようとしていますが、それらはすべてロックされています。ロックされているかロック解除されているかに関係なく、値を送信するにはこれらのテキストボックスが必要です
使っていました
<script language="JavaScript">
<!--
function enable_text(status)
{
status=!status;
document.f1.shopper_pay.disabled = status;
document.f1.shopper_reimb.disabled = status;
document.f1.Shop_cost.disabled = status;
}
//-->
</script>
と
<form name='f1' action='editsurvey.php' method='post'>
<input type="checkbox" name=others onclick="enable_text(this.checked)" >
<input type='text' name='shopper_pay' value=$0.00 disabled='disabled'>
<input type='text' name='shopper_reimb' value=$40.00 disabled='disabled'>
<input type='text' name='Shop_cost' value=$35.00 disabled='disabled'>
残念ながら機能的にはこれは機能しますが、送信時に無効なフィールドが含まれていません - 誰にもアイデアがあります