You can also email us at [email protected]
jQuery(document).ready(function($) {
// first letter of name uppercase $(".zen_name_field").on("keydown", function(event) { if (this.selectionStart == 0 && event.keyCode >= 65 && event.keyCode <= 90 && !(event.shiftKey) && !(event.ctrlKey) && !(event.metaKey) && !(event.altKey)) { var $t = $(this); event.preventDefault(); var char = String.fromCharCode(event.keyCode); $t.val(char + $t.val().slice(this.selectionEnd)); this.setSelectionRange(1,1); } }); // double click protection to stop duplicate submissions $("#zrf_submit").removeAttr("disabled"); $("#zrf-form").bind("submit", function(e) { // check any URL fields $(this).find(".zrf_input_url").each(function() { // is the field required and has been left as http:// default? if (($(this).prop("required"))&& ($(this).val() == "http://")) { alert("Please enter a valid URL"); $(this).css("border", "2px solid #000"); e.preventDefault(); return false; } }); // disable submit button $(this).find("#zrf_submit").attr("disabled", "disabled"); // re-enable after 3 seconds setTimeout(function() { $("form").find("#zrf_submit").removeAttr("disabled"); }, 3000); }); });