我正在尝试为 Salesforce 创建 Web to Case 表单并要求自定义案例字段。我将代码添加到我的 html 的头部,但它不起作用。表单也不会提交。
<html>
<head>
<script language="JavaScript" type="text/javascript">
function checkform (form)
{
var name = document.getElementById('00NC0000005KA85').value;
if (form.name.value == "") {
alert( "Please enter your full name." );form.name.focus();
return false ;
}
return true ;
}
</script>
</head>
<body>
<form action="https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8" method="POST" onsubmit="return checkform(this);">