0

I'm using a freeform with ajax but the response comes back as index.php?ACT=11 and not JSON and therefore I can't manipulate the response. How can I have freeform return JSON instead?

Freeform looks like this:

{exp:freeform:form
form_name="contact_me"
required="first_name|last_name|email|user_message"
recipients="no"
inline_errors="yes"
admin_notify="[email protected]"
notify_admin="yes"
admin_notification_template="contact_form"
form:id="contact-form"
}

My ajaxForm code looks like this:

$(document).ready(function() {
$('#contact-form').ajaxForm({ 
    target: '#form-response',
    success: function() {
                    //$('.formText').hide();
        $('#form-response').fadeIn('slow');
    }
});
});

1 Answer 1

0

I was having the same issue, JSON data doesn't return when you have inline_errors="yes", try to remove inline_error attribute from your form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.