Created
March 14, 2019 01:48
-
-
Save raphaelarias/3aaf1ffd712079bc34451e1a54ab9cba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Start of EducationLink form --> | |
<form id="education-link-form-7uSavR7M986JjYRDv" action="https://app.geteducation.link/api/forms/post?form=7uSavR7M986JjYRDv"></form> | |
<script>jQuery(document).ready(function(){window.$ = window.jQuery; jQuery.getScript("https://app.geteducation.link/resources/forms/form-render.js",function(){jQuery.get("https://api.geteducation.link/forms/get?form=7uSavR7M986JjYRDv",function(e){var o=jQuery("#education-link-form-7uSavR7M986JjYRDv"),t=JSON.stringify(e);o.formRender({formData:t}),o.submit(function(e){e.preventDefault(),o.find('button[type="submit"]').prop("disabled",!0);var t=new FormData(jQuery(this)[0]);try{var r=ga.getAll()[0].get("clientId");t.append("googleAnalyticsClientId",r)}catch(e){console.warn("[EDULINK FORMS] No Google Analytics detected or error appending id to FormData.")}jQuery.ajax({type:"POST",url:e.target.action,data:t,cache:!1,contentType:!1,processData:!1,success:function(){o.parent().append('<div class="alert alert-success" style="margin-top: 60px;" role="alert"><p class="pull-left">We\'ve received your request and will get back soon.</p><div class="clearfix"></div></div>')},error:function(e){o.parent().append('<div class="alert alert-danger" style="margin-top: 60px;" role="alert"><p class="pull-left">'+(e&&e.responseJSON.error)||'Something went wrong, and it was not possible to submit your form.</p><div class="clearfix"></div></div>'),setTimeout(function(){jQuery(".js-error-form").remove(),o.find('button[type="submit"]').prop("disabled",!1)},5e3)}})})})})});</script> | |
<!-- End of EducationLink form --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment