[Plugin: Contact Form 7] & Auto Save
-
Hi there,
I am trying to achieve exactly the same thing as is resolved here, auto save of input, but I cannot get it to work!
An example field in HTML –
<input type="text" name="CompanyName" value="" id="CompanyName" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required ucf_apply_online_text_field" size="40" tabindex="1">
and also, the corresponding JavaScript –
`<script type=”text/javascript”>
$(document).ready(function () {
function storelocal() {
if (localStorage[“CompanyName”]) {
$(‘#CompanyName’).val(localStorage[“CompanyName”]);
}
if (localStorage[“CompanyRegNo”]) {
$(‘#CompanyRegNo’).val(localStorage[“CompanyRegNo”]);
}
}
storelocal();
});$(‘.stored’).change(function () {
localStorage[$(this).attr(‘name’)] = $(this).val();
});$(‘#wpcf7-f61-p58-o1’).submit(function() {
localStorage.clear();
});
</script>`And, finally the URL – https://www.ucfinance.co.uk/apply-online/
Any ideas where I may be going wrong?
Thanks,
A
- The topic ‘[Plugin: Contact Form 7] & Auto Save’ is closed to new replies.