• April 12 to 24 Pre Cert Round Roof
  • April 12 to 24 Standard
  • HM 12 – 24 PRE CERT
  • HM 26 TO 30 PRE CERT
  • 12 to 24 Standard WC
  • WC HORIZONTAL 12 to 24
  • WC ROUND STYLE 12 – 24
  • WC VERTICAL 12 to 24
  • WC STANDARD 26-30
Skyliner Buildings
document.addEventListener('DOMContentLoaded', function() { document.getElementById('wpforms-submit').addEventListener('click', function(event) { event.preventDefault(); // Prevents the default form submission to update the hidden fields first // Assuming 'calculateTotalPrice' updates 'totalPrice' and relevant option prices correctly calculateTotalPrice(); // Your existing function to calculate prices // Update WPForms hidden input fields with calculated prices document.querySelector("[name='frame_size_price']").value = selectedOptions["14 Gauge Vertical Roof Frame"]?.price || 0; document.querySelector("[name='sidewalls_price']").value = selectedOptions["Carport Sidewalls"]?.price || 0; document.querySelector("[name='endwalls_price']").value = selectedOptions["Endwalls"]?.price || 0; document.querySelector("[name='height_of_frame_price']").value = selectedOptions["Height of Frame"]?.price || 0; let extrasTotal = selectedOptions["Extras"]?.reduce((acc, curr) => acc + curr.price, 0) || 0; document.querySelector("[name='extras_price']").value = extrasTotal; // Finally, submit the form. Replace 'YOUR_WPFORMS_FORM_SELECTOR' with the actual form selector document.querySelector('#YOUR_WPFORMS_FORM_SELECTOR').submit(); // This might be something like '#wpforms-form-434' }); });