Require login based on form ID

Answered

1 Comments

  • Kay
    Community Moderator

    Hi Danny Koss 👋

    Yes, you can do this.

    In your Help Center template - script.js

    // change to form ID and redirect Url you need
    var formID = "123456";
    var redirectUri = "https://sparkly.dev";

    if
    (window.location.href.indexOf("/requests/new?ticket_form_id="+formID) > -1
    && HelpCenter.user.role === "anonymous") {

    window.location.replace(redirectUri);
    }
    0

Please sign in to leave a comment.

Powered by Zendesk