<%
  form = local_assigns[:form]
  errors = form&.errors
%>

<h2 id="calculator">Estimate how much you could get</h2>

<%= render 'calculators/error_summary', messages: errors&.messages if form&.invalid? %>

<form action="/adjustable-income/estimate#form" method="get">
  <%= render 'calculators/form_input_currency',
             field: :pot,
             value: form&.pot,
             label: 'How much is in your pot?',
             error_messages: errors&.get(:pot) %>

  <%= render 'calculators/form_input_hidden',
             field: :desired_monthly_income,
             value: form&.desired_monthly_income %>

  <%= render 'calculators/form_input_number',
             field: :age,
             css_classes: 'js-scroll-target',
             value: form&.age,
             label: 'What age do you want to retire?',
             error_messages: errors&.get(:age) %>

  <%= render 'calculators/form_input_submit' %>
</form>

<% if form %>
  <script>
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({
      'event': 'CalculatorEstimate',
      'valid': <%= form.valid? %>
      <% if form.valid? %>
      , 'pot': <%= form.pot.to_i %>
      , 'age': <%= form.age.to_i %>
      <% end %>
    });
  </script>
<% end %>

<%
  form = local_assigns[:form]
  errors = form&.errors
%>

<h2 id="calculator">Estimate how much you could get</h2>

<%= render 'calculators/error_summary', messages: errors&.messages if form&.invalid? %>

<form action="/adjustable-income/estimate#form" method="get">
  <%= render 'calculators/form_input_currency',
             field: :pot,
             value: form&.pot,
             label: 'How much is in your pot?',
             error_messages: errors&.get(:pot) %>

  <%= render 'calculators/form_input_hidden',
             field: :desired_monthly_income,
             value: form&.desired_monthly_income %>

  <%= render 'calculators/form_input_number',
             field: :age,
             css_classes: 'js-scroll-target',
             value: form&.age,
             label: 'What age do you want to take your money?',
             error_messages: errors&.get(:age) %>

  <%= render 'calculators/form_input_submit' %>
</form>

<% if form %>
  <script>
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({
      'event': 'CalculatorEstimate',
      'valid': <%= form.valid? %>
      <% if form.valid? %>
      , 'pot': <%= form.pot.to_i %>
      , 'age': <%= form.age.to_i %>
      <% end %>
    });
  </script>
<% end %>

Update adjustable income calculator copy
Update adjustable income calculator copy

Removed retire after guider feedback. Changed to  '...take your money?'