Redirect link to floating embed button?

  • BangzBarber
    Asked on February 19, 2018 at 12:31 PM

    Hi. Love how you can embed a floating feedback button into my website using JotForm but I want the button to redirect to a different page with actual content in my site. Is this possible? Thanks

  • Adrian
    Replied on February 19, 2018 at 1:40 PM

    It is not possible to do that from the Form Builder but it is doable by making some custom changes.

    You need to add custom HTML, CSS, and a little of JavaScript.

    You can copy the code below and paste it into your website.

    HTML & javascriptDISABLED:

    <button class="jfFeedbackButton u-rate u-bottomRight" id="JF_feedback_embed_80363438475361_3471_button" style="display: inline-block;"><span class="jfFeedbackButton-icon u-rate"></span><span class="jfFeedbackButton-text">Subscribe! </span></button> <script> var redirectButton = document.getElementById("JF_feedback_embed_80363438475361_3471_button"); function redirectTo() { window.location = "https://www.jotform.com"; } redirectButton.addEventListener("click", redirectTo) </script>

    You can change the redirect link to the page that you want by editing the code above. I have set it to https://www.jotform.com.

    CSS:

    https://pastebin.com/raw/5d1XBuhL

    LIVE EXAMPLE: https://goo.gl/ohvY6f



  • BangzBarber
    Replied on February 19, 2018 at 4:43 PM
    Thank you so much for your quick response. Much appreciated. I've replaced
    previous feedback button text with my version of the one you sent me
    (below) and it has dissapeared altogether? Any more advice??
    id="JF_feedback_embed_80363438475361_3471_button"
    style="display: inline-block;">Book
    Now!

    Thanks
    ...
  • Jan
    Replied on February 19, 2018 at 7:46 PM

    Have you tried changing the "window.location" to the URL of your webpage?

    I checked your webpage but I did not see the code provided by my colleague. Can you please direct us to the part of your webpage where the floating feedback button is located?

    We will wait for your reply. Thank you.