0

As a replacement for MX Notify Control, which is not available for EE3, I thought I would try passing a Visitor registration form's data to a Freeform Pro form, so I could use Freeform's notifications to notify site admins of registrations.

I'm submitting the registration form to a template that has a Freeform form surrounded by channel entry tags, which fills the form data. It all works great if I manually submit the form, but I want this to be a hidden form that auto submits to the registration thank you page. I'm using the same auto submit code that I've used elsewhere, but it does not seem to work with Freeform.

I tried removing the surrounding channel entry tags, and made a standard Freeform form, but that didn't auto submit either. I've also tried moving the script to the bottom of the page.

I've tested other auto submit scripts as well, and can't get one to work here.

Could someone take a look at my code and see what the problem is? or what would be an alternative method that would work.

My full template code is:

<!doctype html>
<html lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
     $("#admin_form").submit();
});
</script>
</head>
<body>
{exp:channel:entries 
  channel="zoo_visitor" 
  entry_id="{visitor_id}" 
  status="not closed"
  }
    {exp:freeform:form form_name="new_admin" return="/admins/admin-pending"}
        <input type="hidden" name="first_name" value="{member_firstname} {member_lastname}"/>
        <input type="hidden" name="admin_district" value="{district:label}"/>
        <input type="hidden" name="school" value="{school}"/>
        <input type="hidden" name="admin_adult_type" value="{zv_adult_type}"/>
        <input type="hidden" name="email" value="{email}"/>
        <input type="hidden" name="phone" value="{phone_number}"/>
        <input type="hidden" name="review_bylaws" value="{review_bylaws}"/>

    {/exp:freeform:form}
{/exp:channel:entries}

</body>
</html>

Thank you.

0

I figured it out. I needed to add form:ATTRIBUTE_NAME= parameters to my Freeform form. I added both form:name="new_admin" form:id="new_admin". The hidden form is now auto submitting and registration notifications are being sent out.

Your Answer

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

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