I encountered an issue with form3/chart3 while trying to replicate the success of form1/chart1 and form2/chart2. Despite following the same steps and structure, form3/chart3 seems to be malfunctioning. The error message I'm receiving is "Uncaught ReferenceError: can't access lexical declaration 'amtSavingsInput' before initialization."
Below is the code snippet for form3/chart3:
// The code for form3/chart3 goes here...
Accompanied by a simple HTML bootstrap form:
<div class="col-md-6">
<h2>Savings and Investments</h2>
<p>Growing wealth is about holding onto money. Choose how much of your £<span class="inline-block"
id="cashLeftDisplay2"></span> (cash leftover) that you will save or invest.</p>
<form> <!-- Savings & Investments form-->
<div class="mb-3">
<label for="amt_Savings" class="form-label">Amount in a Savings Account</label>
<input type="text" class="form-control" id="amt_Savings" value="0" placeholder="0">
</div>
<div class="mb-3">
<label for="yield_Savings" class="form-label">Yearly Interest % Earned</label>
<input type="text" class="form-control" id="yield_Savings" value="0" placeholder="0">
</div>
<div class="mb-3">
<label for="amt_Vanguard" class="form-label">Amount in Vanguard Account</label>
<input type="text" class="form-control" id="amt_Vanguard" value="0" placeholder="0">
</div>
<div class="mb-3">
<label for="yield_Vanguard" class="form-label">Benchmark % Return</label>
<input type="text" class="form-control" id="yield_Vanguard" value="0" placeholder="0">
</div>
</form>
<button class="btn btn-primary" id="nextButton">Next</button>
</div>