I am using Gravity forms for my custom theme in WordPress and it seems that ajax is not working in my case I have this code to call the form
<?php gravity_form(3, 'Contact us', null, false, [], true, 100, true); ?>
I have also tried to put this in the header
<?php gravity_form_enqueue_scripts(3, true); ?>
nothing works. But when ajax = true, when I view the page source, I can see ajax words there. By clicking the send button of the form the page will reload by itself even though the fields in the form is blank and is required.
I am using a theme file for the contact form. The entire section is in the section-contactus.php in the includes folder
I found the problem myself...
<form>
<?php gravity_form(3, 'Contact us', null, false, [], true, 100, true); ?>
</form>
It is the form tag that encloses my gravity_form function. It should be like this only without the tag.
<?php gravity_form(3, 'Contact us', null, false, [], true, 100, true); ?>