the the following code correct: <!DOCTYPE html> 

<html lang="en"> 

<head> 

    <title>Steel Construction Cost Estimate</title> 

    <style> 

        .form-container { 

            max-width: 800px; 

            margin: auto; 

            padding: 10px; 

            border: 1px solid #ccc; 

            border-radius: 5px; 

        } 

 

        label, input, button, select { 

            display: flexblock; 

            padding: 5px; 

            margin: 3px 0; 

        } 

 

 

        .dropdown-group { 

            margin-bottom: 5px; 

        } 

 

        .dropdown-group label { 

            display: block; /* Makes the label appear on a new line */ 

        } 

 

        button { 

            background-color: orangered; 

            color: white; 

            cursor: pointer; 

        } 

 

        label.required::after { 

            content: "*"; 

            color: orangered; 

            margin-left: 5px; 

        } 

 

        #estimatedCost { 

            font-weight: bold; 

            margin-top: 5px; 

        } 

 

        .radio-group label { 

            display: inline-block; 

            margin-right: 10px; /* Adjust the margin between radio buttons */ 

        } 

 

        .radio-group input[type="radio"] { 

            display: inline-block; 

            margin-right: 5px; /* Adjust the margin between radio buttons */ 

        } 

 

    </style> 

</head> 

<body> 

    <div class="form-container"> 

        <form id="fd88d2c" onsubmit="return calculateCost()"> 

            <fieldset> 

            <label for="name-764" class="required">Name:</label> 

            [text* name-764 id:name-764] 

             

            <label for="email-254" class="required">Email:</label> 

            [email* email-254 id:email-254] 

            

            <label for="tel-784" class="required">Telephone Number:</label> 

            [tel* tel-784 id:tel-784]           

        </fieldset> 

 

        <div class="radio-group"> 

            <label>Select Material:</label> 

            <label><input type="radio" name="material" value="chromadek" checked> Chromadek</label> 

            <label><input type="radio" name="material" value="galvanized"> Galvanized</label> 

        </div> 

 

        <div class="dropdown-group"> 

            <label for="lengthInput">Enter Length (in meters):</label> 

            <input type="number" id="lengthInput" name="length" min="5" max="100" oninput="checkFormValidity()"> 

        </div> 

 

        <div class="dropdown-group"> 

            <label for="widthDropdown">Select Width (in meters):</label> 

            <select id="widthDropdown" name="width" onchange="checkFormValidity()"> 

                <option value="">Select Width</option> 

                <option value="40">40m</option> 

                <option value="35">35m</option> 

                <option value="30">30m</option> 

                <option value="25">25m</option> 

                <option value="20">20m</option> 

                <option value="18">18m</option> 

                <option value="15">15m</option> 

                <option value="12">12m</option> 

            </select> 

        </div> 

 

        <div class="dropdown-group"> 

            <label for="sourceDropdown">Where did you hear about us?</label> 

            <select id="sourceDropdown" name="source" onchange="checkFormValidity()"> 

                <option value="">Select Source</option> 

                <option value="website">Website</option> 

                <option value="referral">Referral from someone</option> 

                <option value="onsite">Saw us on site</option> 

                <option value="linkedin">LinkedIn</option> 

                <option value="facebook">Facebook</option> 

                <option value="instagram">Instagram</option> 

                <option value="vehicle">Vehicle branding</option> 

                <option value="other">Other</option> 

            </select> 

        </div> 

            <button type="submit" id="calculateButton" onclick="calculateCost()">Calculate Cost</button> 

            <input type="hidden" id="hiddenCost" name="hiddenCost" value=""> 

        </form> 

        <div id="estimatedCost"></div> 

    </div> 

  

    <script> 

       // Function to get the price for Chromadek material based on width and length 

function getPriceChromadek(width, length) { 

    switch (width) { 

        case 40: 

            switch (length) { 

                case 5: return 218200; 

                case 10: return 436400; 

                case 15: return 654600; 

                case 20: return 872800; 

                case 25: return 1057000; 

                case 30: return 1268400; 

                case 35: return 1425200; 

                case 40: return 1628800; 

                case 45: return 1792800; 

                case 50: return 1992000; 

                case 55: return 2162600; 

                case 60: return 2359200; 

                case 65: return 2529800; 

                case 70: return 2724400; 

                case 75: return 2898000; 

                case 80: return 3091200; 

                case 85: return 3267400; 

                case 90: return 3459600; 

                case 95: return 3613800; 

                case 100: return 3804000; 

            } 

            break; 

        case 35: 

            switch (length) { 

                case 5: return 210175; 

                case 10: return 420350; 

                case 15: return 630525; 

                case 20: return 840700; 

                case 25: return 1021125; 

                case 30: return 1225350; 

                case 35: return 1382575; 

                case 40: return 1580100; 

                case 45: return 1738800; 

                case 50: return 1932000; 

                case 55: return 2097750; 

                case 60: return 2289000; 

                case 65: return 2456275; 

                case 70: return 2645450; 

                case 75: return 2817125; 

                case 80: return 3004400; 

                case 85: return 3178800; 

                case 90: return 3365200; 

                case 95: return 3539800; 

                case 100: return 3724000; 

            } 

            break; 

        case 30: 

            switch (length) { 

                case 5: return 160200; 

                case 10: return 320400; 

                case 15: return 480600; 

                case 20: return 640800; 

                case 25: return 771750; 

                case 30: return 926100; 

                case 35: return 1034250; 

                case 40: return 1182000; 

                case 45: return 1296000; 

                case 50: return 1440000; 

                case 55: return 1559250; 

                case 60: return 1701000; 

                case 65: return 1821300; 

                case 70: return 1961400; 

                case 75: return 2083500; 

                case 80: return 2222400; 

                case 85: return 2346000; 

                case 90: return 2484000; 

                case 95: return 2609250; 

                case 100: return 2745000; 

            } 

            break; 

        case 25: 

            switch (length) { 

                case 5: return 127750; 

                case 10: return 255500; 

                case 15: return 383250; 

                case 20: return 511000; 

                case 25: return 615000; 

                case 30: return 738000; 

                case 35: return 823250; 

                case 40: return 942000; 

                case 45: return 1031625; 

                case 50: return 1146250; 

                case 55: return 1240250; 

                case 60: return 1353000; 

                case 65: return 1449500; 

                case 70: return 1561000; 

                case 75: return 1657500; 

                case 80: return 1768000; 

                case 85: return 1865750; 

                case 90: return 19755000; 

                case 95: return 2075750; 

                case 100: return 2185000; 

            } 

            break; 

        case 20: 

            switch (length) { 

                case 5: return 94400; 

                case 10: return 188800; 

                case 15: return 283200; 

                case 20: return 377600; 

                case 25: return 456500; 

                case 30: return 547800; 

                case 35: return 613900; 

                case 40: return 701600; 

                case 45: return 771300; 

                case 50: return 857000; 

                case 55: return 929500; 

                case 60: return 1014000; 

                case 65: return 1086800; 

                case 70: return 1170400; 

                case 75: return 1245000; 

                case 80: return 1328000; 

                case 85: return 1402500; 

                case 90: return 1485000; 

                case 95: return 1559900; 

                case 100: return 1642000; 

            } 

            break; 

case 18: 

            switch (length) { 

                case 5: return 78390; 

                case 10: return 156780; 

                case 15: return 235170; 

                case 20: return 313560; 

                case 25: return 379800; 

                case 30: return 455760; 

                case 35: return 512190; 

                case 40: return 585360; 

                case 45: return 644760; 

                case 50: return 716400; 

                case 55: return 778140; 

                case 60: return 848880; 

                case 65: return 912330; 

                case 70: return 982740; 

                case 75: return 1044550; 

                case 80: return 1114320; 

                case 85: return 1175970; 

                case 90: return 1245780; 

                case 95: return 1309860; 

                case 100: return 1378800; 

            } 

            break; 

        case 15: 

            switch (length) { 

                case 5: return 59925; 

                case 10: return 119850; 

                case 15: return 179775; 

                case 20: return 239700; 

                case 25: return 291750; 

                case 30: return 350100; 

                case 35: return 395850; 

                case 40: return 452400; 

                case 45: return 500175; 

                case 50: return 555750; 

                case 55: return 604725; 

                case 60: return 659700; 

                case 65: return 708825; 

                case 70: return 763350; 

                case 75: return 813375; 

                case 80: return 867600; 

                case 85: return 918000; 

                case 90: return 972000; 

                case 95: return 1021725; 

                case 100: return 1075500; 

            } 

            break; 

        case 12: 

            switch (length) { 

                case 5: return 60600; 

                case 10: return 121200; 

                case 15: return 181800; 

                case 20: return 242400; 

                case 25: return 294900; 

                case 30: return 353880; 

                case 35: return 399840; 

                case 40: return 456960; 

                case 45: return 514080; 

                case 50: return 561000; 

                case 55: return 609840; 

                case 60: return 665280; 

                case 65: return 715260; 

                case 70: return 770280; 

                case 75: return 819900; 

                case 80: return 874560; 

                case 85: return 925140; 

                case 90: return 97950; 

                case 95: return 1029420; 

                case 100: return 1083600; 

            } 

            break; 

        default: 

            return 0; // default return if no matching case 

    } 

} 

  

        // Function to get the price for Galvanized material based on width and length 

function getPriceGalvanized(width, length) { 

    switch (width) { 

        case 40: 

            switch (length) { 

                case 5: return 205800; 

                case 10: return 411600; 

                case 15: return 617400; 

                case 20: return 823200; 

                case 25: return 996000; 

                case 30: return 1194000; 

                case 35: return 1339800; 

                case 40: return 1531200; 

                case 45: return 1683000; 

                case 50: return 1870000; 

                case 55: return 2026400; 

                case 60: return 2217600; 

                case 65: return 2371200; 

                case 70: return 2548800; 

                case 75: return 2715000; 

                case 80: return 2896000; 

                case 85: return 3060000; 

                case 90: return 3240000; 

                case 95: return 3404800; 

                case 100: return 3584000; 

            } 

            break; 

        case 35: 

            switch (length) { 

                case 5: return 199500; 

                case 10: return 399000; 

                case 15: return 598500; 

                case 20: return 798000; 

                case 25: return 967375; 

                case 30: return 1157000; 

                case 35: return 1291250; 

                case 40: return 1493200; 

                case 45: return 1639800; 

                case 50: return 1827000; 

                case 55: return 1997250; 

                case 60: return 2175000; 

                case 65: return 2318600; 

                case 70: return 2493700; 

                case 75: return 2662425; 

                case 80: return 2835800; 

                case 85: return 2968800; 

                case 90: return 3171600; 

                case 95: return 3329700; 

                case 100: return 3510000; 

            } 

            break; 

        case 30: 

            switch (length) { 

                case 5: return 150900; 

                case 10: return 301800; 

                case 15: return 452700; 

                case 20: return 603600; 

                case 25: return 726000; 

                case 30: return 870000; 

                case 35: return 971250; 

                case 40: return 1110000; 

                case 45: return 1215000; 

                case 50: return 1350000; 

                case 55: return 1462500; 

                case 60: return 1620000; 

                case 65: return 1701000; 

                case 70: return 1834800; 

                case 75: return 1946100; 

                case 80: return 2078400; 

                case 85: return 2202300; 

                case 90: return 2322000; 

                case 95: return 2441250; 

                case 100: return 2565000; 

            } 

            break; 

        case 25: 

            switch (length) { 

                case 5: return 120000; 

                case 10: return 240000; 

                case 15: return 360000; 

                case 20: return 480000; 

                case 25: return 575000; 

                case 30: return 690000; 

                case 35: return 770000; 

                case 40: return 880000; 

                case 45: return 963000; 

                case 50: return 1071000; 

                case 55: return 1151125; 

                case 60: return 1261500; 

                case 65: return 1352375; 

                case 70: return 1456500; 

                case 75: return 1543125; 

                case 80: return 1646000; 

                case 85: return 1726875; 

                case 90: return 1832250; 

                case 95: return 1923375; 

                case 100: return 2032500; 

            } 

            break; 

        case 20: 

            switch (length) { 

                case 5: return 88200; 

                case 10: return 176400; 

                case 15: return 264600; 

                case 20: return 352800; 

                case 25: return 425500; 

                case 30: return 510600; 

                case 35: return 571200; 

                case 40: return 652800; 

                case 45: return 716400; 

                case 50: return 796000; 

                case 55: return 861300; 

                case 60: return 939600; 

                case 65: return 1007000; 

                case 70: return 1085000; 

                case 75: return 1152000; 

                case 80: return 1228800; 

                case 85: return 1292400; 

                case 90: return 1372800; 

                case 95: return 1444000; 

                case 100: return 1520000; 

            } 

            break; 

        case 18: 

            switch (length) { 

                case 5: return 72630; 

                case 10: return 145260; 

                case 15: return 217890; 

                case 20: return 290520; 

                case 25: return 351450; 

                case 30: return 421860; 

                case 35: return 473670; 

                case 40: return 540720; 

                case 45: return 594000; 

                case 50: return 661200; 

                case 55: return 715920; 

                case 60: return 782880; 

                case 65: return 837480; 

                case 70: return 900720; 

                case 75: return 959100; 

                case 80: return 1025280; 

                case 85: return 1080510; 

                case 90: return 1145580; 

                case 95: return 1202280; 

                case 100: return 1269600; 

            } 

            break; 

        case 15: 

            switch (length) { 

                case 5: return 55050; 

                case 10: return 110100; 

                case 15: return 165150; 

                case 20: return 220200; 

                case 25: return 267375; 

                case 30: return 320850; 

                case 35: return 362250; 

                case 40: return 414000; 

                case 45: return 457650; 

                case 50: return 508500; 

                case 55: return 553500; 

                case 60: return 603000; 

                case 65: return 643800; 

                case 70: return 696600; 

                case 75: return 742500; 

                case 80: return 793200; 

                case 85: return 831450; 

                case 90: return 885660; 

                case 95: return 926550; 

                case 100: return 981000; 

            } 

            break; 

        case 12: 

            switch (length) { 

                case 5: return 55800; 

                case 10: return 111600; 

                case 15: return 167400; 

                case 20: return 223200; 

                case 25: return 270900; 

                case 30: return 325080; 

                case 35: return 366780; 

                case 40: return 419040; 

                case 45: return 462480; 

                case 50: return 513600; 

                case 55: return 556200; 

                case 60: return 607800; 

                case 65: return 653100; 

                case 70: return 704520; 

                case 75: return 748800; 

                case 80: return 798720; 

                case 85: return 846720; 

                case 90: return 894240; 

                case 95: return 940500; 

                case 100: return 990000; 

            } 

            break; 

        default: 

            return 0; // default return if no matching case 

    } 

}  

        // Function to calculate the total price based on material, width, and length 

        function calculateTotalPrice(material, width, length) { 

            if (material === 'Chromadek') { 

                return getPriceChromadek(width, length); 

            } else if (material === 'Galvanized') { 

                return getPriceGalvanized(width, length); 

            } else { 

                return 0; // default return if no matching material 

            } 

        } 

  

        function updateCost() { 

            var material = document.querySelector('input[name="material"]:checked').value; 

            var length = parseInt(document.getElementById("lengthDropdown").value); 

            var width = parseInt(document.getElementById("widthDropdown").value); 

            var cost = calculateTotalPrice(material, width, length); 

  

            document.getElementById("hiddenCost").value = cost; 

            document.getElementById("estimatedCost").innerText = "Estimated Cost: R " + cost.toLocaleString(); 

        } 

  

        function calculateCost() { 

            updateCost(); 

            return false; // Prevent form submission for demo 

        } 

  

        // Add event listener to material radio buttons 

        document.querySelectorAll('input[name="material"]').forEach(function(radio) { 

            radio.addEventListener('change', updateCost); 

        }); 

    </script> 

</body> 

</html>