Form Test

Submit





Submit

var renderGoogleInvisibleRecaptcha = function() { for (var i = 0; i

if($("#"+form_id+" input#name").val() == 'test' || $("#"+form_id+" input#name").val() == 'test#') { //$("input#name").val('Testing'); $("#"+form_id+" input#email").val('test.sabaseo@gmail.com'); $("#"+form_id+" input#phonenumber").val('(123) 456-7890'); $("#"+form_id+" select#besttimetocall").val('8-11am'); $("#"+form_id+" select#typeofcare").val('Hourly Care'); $("#"+form_id+" textarea#message").val('Form Test'); } } }

if(!$.isFunction('validate_form')) { function validate_form(form_id){ $ = jQuery;

$('#'+form_id+' #form_errors').removeClass('error').html(''); var name = $("#"+form_id+" input#name").val(); var email = $("#"+form_id+" input#email").val(); var phonenumber = $("#"+form_id+" input#phonenumber").val(); var besttimetocall = $("#"+form_id+" select#besttimetocall").val(); var typeofcare = $("#"+form_id+" select#typeofcare").val(); var message = $("#"+form_id+" textarea#message").val(); var error = '';

// If name is test#, no client-side validations // will be performed and form will be submitted. // This is to test server-side validations to make // sure that, if form submits invalid/spam data, how much // server-side processing is spam proof. So, submit form // with Name = test# in order to test for server-side // validations. if(name == 'test#') { $('#'+form_id+' #requestform').submit(); }

if (name == "Name" || name == "") { error += "Please enter your name.
"; } if(!email || email == "Email Address" || !isValidEmailAddress( email )) { error += "Please enter a valid email address.
"; }

if(!phonenumber || phonenumber == "Phone Number" || !isValidatePhoneNumber( phonenumber )) { error += "Please enter a valid phone number.
"; }

if (besttimetocall == "Best time to Call") { error += "Please enter your time to call.
"; } if (typeofcare == "Type Of Care") { error += "Please enter your preferred type of care.
"; } if (message == "Message" || message == "") { error += "Please enter your message.
"; } if(error != ""){ $('#'+form_id+' #form_errors').addClass('error').html(error); return false; }else{ $('#'+form_id+'').submit(); }

} }

if(!$.isFunction('isValidEmailAddress')) { function isValidEmailAddress(emailAddress) { var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); return pattern.test(emailAddress); } }

function isValidatePhoneNumber(elementValue){ var phoneNumberPattern = /^(([0-9]{1})*[- .(]*([0-9a-zA-Z]{3})*[- .)]*[0-9a-zA-Z]{3}[- .]*[0-9a-zA-Z]{4})+$/; return phoneNumberPattern.test(elementValue); }

$(".txtField").focus(function () { $(this).prevAll('span:first').css('color', 'white'); });

$(".txtField").blur(function () { $(this).prevAll('span:first').css('color', '#A9BEBF'); });

Or Call (802) 231-0415

to speak with a Care Manager Now