Hello amandapiasta,
please try removing functions onblur=”replace[field name]()” from Plugins\responsive-contact-form\include\ai-contact-form-template.php page and include your script in same page,
and please correct errors in input fields, spacing before and after attributes as I found it on your site.
If you still find any trouble, please let us know.
Regards,
August Infotech
Hi August,
thanks for the reply. Where does the extra space come from? I have no idea why that is there. I am viewing it in developer tools for chrome and it shows me something like this:
<div class="control-group message">
:before
<label class="control-label" for="ai_comment">...</label>
<div class="controls">...</div>
:after
</div>
I assume you are talking about the :before and :after spots …but I don’t know where those are being inserted.
Well i figured out how to remove the previous stated :before and :after … they were included from the contact.css
It still does not seem to be working… seems to be another javascript error because if I do not include my code it works, but if I add it in, it doesn’t work. :/
I have added the following in ai-contact-form-template.php above the functions:
$(document).ready(function() {
//remove form values when user clicks in the field.
$('.rmv-dft-val').click(
function() {
if (this.value == this.defaultValue) {
this.value = '';
}
}
);//close on click
$('.rmv-dft-val').blur(
function() {
if (this.value == '') {
this.value = this.defaultValue;
}
}
);// close on blur
});
Hello amandapiasta,
We have found below jquery error in your contact page.
Error: TypeError: $ is not a function
Source File: http://taragaucher.com/directory/contact/
Line: 7254
Solution is : put jQuery instead of $
Kindly check and put below code in your template.
jQuery(document).ready(function() {
//remove form values when user clicks in the field.
jQuery('.rmv-dft-val').click(
function() {
if (this.value == this.defaultValue) {
this.value = '';
}
}
);//close on click
jQuery('.rmv-dft-val').blur(
function() {
if (this.value == '') {
this.value = this.defaultValue;
}
}
);// close on blur
});