Please note, I have referred to this answer and my solution is currently using that approach.
Here is my HTML:
<head>
<script>
document.getElementById('average_price').onchange = function() {
document.getElementById('average_price_symbol').disabled = !this.checked;
};
</script>
</head>
<center>
<form action="/custom" method="POST">
<h2>Generate Custom Report</h2>
<br>
<input type="checkbox" id="average_price" name="average_price"> <b>Average Price</b>
<br>
<input type="text" id="average_price_symbol" name="average_price_symbol" placeholder="symbol" disabled>
<br>
<input type="submit" value="RUN">
</form>
</center>
When the form loads, the text field is disabled, however, the checkbox does not change the state of the field. I'm not exactly sure what's going wrong.