0

I'm trying to get callbacks ( https://docs.solspace.com/craft/freeform/v3/templating/ajax-forms.html#advanced ) to work on a bare-bones ajax enabled freeform form but for whatever reason even the 'freeform-ready' event doesn't even register, the alert never fires. What am I missing here?

<div class="container">
    <div class="row">
        {% set form = craft.freeform.form('ajaxTest') %}

        {{ form.render }}

        {{ craft.freeform.loadFreeformScripts(form) }}

    </div>
</div> <!-- #container -->

<script>    
      form.addEventListener('freeform-ready', function (event) {
           alert("freeform ready");
      });
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.