如果有人将其留空,我想让我的网络提交不向我发送字段中的默认 txt。我不是一个超级程序员,我花了好几个小时试图让它今天工作,并且需要处理其他代码部分。
<form action="{SUBMIT_FORM}" method="post">
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = '*First Name : (Required Field)';}" onfocus="if (this.value == '*First Name : (Required Field)') {this.value = '';}" name="{lead_first_name}" id="{lead_first_name}" value="*First Name : (Required Field)"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = 'Last Name :';}" onfocus="if (this.value == 'Last Name :') {this.value = '';}" name="{lead_last_name}" id="{lead_last_name}" value="Last Name :"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = '*Email : (Required Field)';}" onfocus="if (this.value == '*Email : (Required Field)') {this.value = '';}" name="{lead_email}" id="{lead_email}" value="*Email : (Required Field)"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = 'Phone :';}" onfocus="if (this.value == 'Phone :') {this.value = '';}" name="{lead_home_phone}" id="{lead_home_phone}" value="Phone :"/>
<input type="submit" class="sbt-btn" value="Submit" onclick="{SUBMIT_SCRIPT}" />
{VALIDATE_SCRIPT}
</form>
<small>*We promise to never share, rent or sale your personal information.</small>