data-redirect stops functioning after AutoValidator?

Jaxel

Well-known member
So on one of my pages I have an AutoValidator with a data-redirect:
Code:
<form action="{xen:link 'rankings/league/admin', $league}" method="post" class="xenForm AutoValidator" data-redirect="true">
    <input type="text" name="event_url" class="textCtrl" id="ctrl_url" value="" />
    <input type="submit" value="{xen:phrase add_bracket_to_league}" name="submit" accesskey="s" class="button primary" />
    <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>

Normally, this code works perfectly fine. However, I ALSO have a form elsewhere which does not have a data-redirect. It is instead running some javascript code after AutoValidation:
Code:
XenForo.register('.SublinkDeleter', 'XenForo.SublinkDeleter');

XenForo.SublinkDeleter = function($form) {
    $form.bind('AutoValidationComplete', function(e) {
        $('#event_'+$form.data('event')).xfRemove("xfFadeOut");
    });
}

In a vacuum, both functions work great. The issue I am having is after running the second function, the data-redirect of the first function stops working. I have a video explaining the issue:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Back
Top Bottom