What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Make a form right unclickable?

    Asked by searchbar3 on March 03, 2012 at 08:08 AM

    How can i make my form right unclickable?

    (so when someone right clicks on my form, nothing happens)

    Any help is greatly appreciated!

  • Profile Image
    JotForm Support

    Answered by abajan on March 03, 2012 at 08:29 AM

    In an effort to prevent copying, webmasters sometimes use scripts to disable right-clicking on images but all such scripts are easily circumvented. I can search for a script for you but is there some particular reason why you would want to disable right-clicking on an entire form?

    Just curious.

  • Profile Image

    Answered by searchbar3 on March 03, 2012 at 08:42 AM

    ah thanks for taking your time to search for a script.

    yeah the reason for wanting to disable right click is because on the page that

    my form is embedded on has my google ad codes. Eventhough my

    page has a script to disable right click, it can be accessed by the form by clicking view source. So people can copy my html codes. Also I do not want people to find out my google ad codes because it could get my account suspended!

     

    Thanks for replying!

  • Profile Image

    Answered by sarfaraz0075 on March 03, 2012 at 09:13 AM

    Hi,

    I can understand your concern regarding Google Adsense code getting copied. But there is an easier and smarter solution for this. You can just login to the Google Adsense Account and restrict your code to appear only on sites you want them to appear. So even if someone copies it and use it elsewhere you will not get banned.

     

    Thanks

    Sarfaraz

  • Profile Image

    Answered by searchbar3 on March 03, 2012 at 09:19 AM

    yeah ok but it still doesnt help my own codes from getting copied?

    Thanks for your reply Sarfaraz

  • Profile Image

    Answered by sarfaraz0075 on March 03, 2012 at 09:44 AM

    I did not came across any of the ways in jotForm to restrict right click so far.

    As of my opinion restricting right click do not protect codes. Please check the following link for more details: http://www.sitepoint.com/dont-disable-right-click

  • Profile Image

    Answered by kemeice on March 03, 2012 at 12:58 PM

     

    What I would suggest you do is disable right click for the page that the form is embedded on using javascript .

    Please to keep in mind that a person can always disable javascript as a result this method is not fool proof.

     

    Below is a script please to place it between <head> and </head> of your page .

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Disable
    function disableselect(e){
    return false
    }

    function reEnable(){
    return true
    }

    //if IE4+
    document.onselectstart=new Function ("return false")
    document.oncontextmenu=new Function ("return false")
    //if NS6
    if (window.sidebar){
    document.onmousedown=disableselect
    document.onclick=reEnable
    }
    //-->
    </script>

  • Profile Image

    Answered by searchbar3 on March 03, 2012 at 03:25 PM

    yeah but it doesnt effect the form at all. The other parts are unclickable but the forms arent :(

  • Profile Image
    JotForm Support

    Answered by mliz on March 04, 2012 at 12:13 AM

    Have you tried adding the code in the Javascript section of the source code of the form before embeding it to your website?

    To get the source code of the form:

    1. Open the Form in JotForm
    2. Click on 'Setup & Embed' > 'Embed Form'
    3. From the options select Source copy the code provided,

    In the source code you will see a section for the JavaScript code this where you can insert the code provided before embeding it to your website.


    Let us know if this works

  • Profile Image

    Answered by searchbar on March 04, 2012 at 03:23 AM
  • Profile Image

    Answered by searchbar3 on March 04, 2012 at 04:23 AM

    it doesnt seem to work. Maybe im doing it wrong. 

    Can you specify a specific place to place the code!

     

    Thanks again!

  • Profile Image
    JotForm Support

    Answered by mliz on March 04, 2012 at 08:00 AM

    You can place it right after  <script type="text/javascript"> and before  </script> the embed code of the form would have the following:

    <script type="text/javascript">

    <!-- Disable
    function disableselect(e){
    return false
    }

    function reEnable(){
    return true
    }

    //if IE4+
    document.onselectstart=new Function ("return false")
    document.oncontextmenu=new Function ("return false")
    //if NS6
    if (window.sidebar){
    document.onmousedown=disableselect
    document.onclick=reEnable
    }
    //-->

    </script>

  • Profile Image

    Answered by searchbar3 on March 04, 2012 at 08:12 AM

    i tried this and it doesnt seem to be working and im not sure if im doing it wrong!

    To make things easier for you and me, try this

    Can you add the no right click code directly to here http://pastie.org/3518239

    on this form so i can see whether it works! (send me the codes with the added code)

     

    Thanks for your time!

  • Profile Image
    JotForm Support

    Answered by idarktech on March 04, 2012 at 08:42 AM

    @searchbar3,

    I have added that script for you. Here's now the final code: http://pastebin.com/raw.php?i=dQZ6UsZf

    You can test the final result here: http://idarktech.com/test/sample_form_from_jotform.html

    It's perfectly working on my side. Tested on Chrome, FF and Opera. Please try it and let us know what your results are. Thanks.

  • Profile Image

    Answered by searchbar3 on March 04, 2012 at 10:39 AM

    Thanks 

    It works. See its was my misunderstanding after all!

    Is there anyway to place this no right click code on a table report?

     

    Have a nice day

  • Profile Image

    Answered by bl on March 04, 2012 at 03:26 PM

    @searchbar3 anyone who wants to view the page source isn't going to be stopped by not being able to right click. You're just wasting your time. It's impossible to stop people from doing so unless you don't want them on your website.

  • Profile Image
    JotForm Support

    Answered by idarktech on March 04, 2012 at 04:47 PM

    @searchbar3,

    No, it's not possible. We do not allow editing reports source.

    Thanks for understanding.

  • Profile Image

    Answered by lhslock on June 16, 2012 at 12:20 PM

    how do you disable the right click on a popup window?

  • Profile Image
    JotForm Support

    Answered by jonathan on June 16, 2012 at 06:39 PM

    @lhslock

    Hi, can you please provide us more details like your form ID# and URL of website where the form was used, we will check what can be done.

    Thanks.

  • Profile Image

    Answered by lhslock on June 16, 2012 at 08:13 PM
    Hello, I appreciate your concern, but I have already solved the issue.
    Thanks.
  • Profile Image
    JotForm Support

    Answered by jonathan on June 16, 2012 at 08:18 PM

    Thank you for updating us lhslock. We are glad to know that everything is sorted already.

    Welcome. =)