If you want JavaScript to enable multiple boxes with one button click, you need to either statically fetch them all (like my example did, but with more than one box), or create a script to fetch all of the boxes you want.
The
document.getElementsByTagName could fetch all the input elements for you so you could sort through them and find those you need to enable.
var boxes = document.getElementsByTagName('input');
for(var i = 0; i < boxes.length; i++) {
// Sort through the boxes here.
}
You could give all the boxes that you need to enable a specific attribute to check, like
'doEnable', which you could fetch in your JavaScript code with the
getAttribute function.
Like:
<input doEnable="yes" .../>
if(boxes[i].getAttribute('doEnable') == 'yes') {
boxes[i].disabled = false;
}
And P.S.
If you want to send multiple <input> boxes with the same name to PHP, they should be named
<input name="name[]" .../> . That way all of them will be sent to PHP as an array, not just the last one in the form.