You are on page 1of 2

<!

DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<title>Web-to-Case Form</title>
</head>
<body>

<form action="https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-
8&orgId=00D5j00000DqilF" method="POST" onsubmit="return validateForm()">

<input type="hidden" name="orgid" value="00D5j00000DqilF">


<input type="hidden" name="retURL" value="https://www.google.com/">

<!-- Optional debugging elements -->


<!-- Uncomment these lines if you wish to test in debug mode -->
<!-- <input type="hidden" name="debug" value="1"> -->
<!-- <input type="hidden" name="debugEmail" value="ayadav2@kloudrac.com"> -->

<label for="name">Contact Name</label>


<input id="name" maxlength="80" name="name" size="20" type="text"/><br>

<label for="phone">Phone</label>
<input id="phone" maxlength="40" name="phone" size="20" type="text"/><br>

<label for="email">Email</label>
<input id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="subject">Subject</label>
<input id="subject" maxlength="80" name="subject" size="20" type="text"
required/><br>

<label for="priority">Priority</label>
<select id="priority" name="priority">
<option value="">--None--</option>
<option value="High">High</option>
<option value="Medium">Medium</option>
<option value="Low">Low</option>
</select><br>

<input type="submit" name="submit">

</form>

<script>
function validateForm() {
var subject = document.getElementById("subject").value;

// Validate that the subject is provided


if (subject.trim() === "") {
alert("Subject is required.");
return false; // Prevent form submission
}

// If the subject is filled out, the form will be submitted


return true;
}
</script>
</body>
</html>

You might also like