window.addEventListener("DOMContentLoaded", function() {
    var r1 = document.getElementById("r1");
    var month = document.getElementById("month");
    var month1 = document.getElementById("month1");
    var r2 = document.getElementById("r2");
    var Career = document.getElementById("Career");
    var othercareer = document.getElementById("othercareer");

    var customerphoneField = document.getElementById("customer-phone-field");
    var customer_phone = document.getElementById("customer-phone");
    var customercityField = document.getElementById("customer-city-field");
    var customer_city = document.getElementById("customer-city");
    var TransportationpriceField = document.getElementById("Transportation-price-field");
    var Transportation_price = document.getElementById("Transportation-price");
    r2.addEventListener("change", function() {
      if (Career.value === "أخرى") {
        othercareer.style.display = "none";
        othercareer.required = false;
        

      }
    });
    r2.addEventListener("change", function() {
      if (r2.value === "لا ليس لدي رغبة") {
        month.style.display = "none";
        month1.required = false;
        

      }
    });
    r1.addEventListener("change", function() {
      if (r1.value === "نعم لدي رغبة") {
        month.style.display = "block";
        month1.required = true;
        

      }
    });
    
  });