Why is my code disappearing?

  • Profile Image
    Asked on August 31, 2011 at 02:51 PM

    I have created a sign-up for a newsletter/like or follow on social media form.  I have conditions set up to hide or show certain parts of the form depending upon selection from a drop down menu.  If they select email, it shows the email address entry field; if they select facebook, it shows the facebook like box; etc.  The last option on the menu is LinkedIn.  If they select this option, it should show the LinkedIn company profile box, which has a follow button.  I created a free text section of the form and pasted in the html code for the LinkedIn profile box (this is also how I created the sections containing the Facebook like box and Twitter follow button).  Initially, I got it to work (in the preview), but when I tested it on a web page, everything works except that the LinkedIn box won't appear.  So I went back to JotForm to check the code.  When I clicked on Edit HTML for the section that should have had the code for the LinkedIn box, there is nothing there.  I tried adding the code again, and the same thing happened.  The code just disappears from the box.

    Here is the code for the LinkedIn box (hopefully you will see the code itself and not the actual box):

    <script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
    <script type="IN/CompanyProfile" data-id="2300681" data-format="inline"></script>

    How can I make this work?

  • Profile Image
    Answered on September 01, 2011 at 11:37 AM

    Hello Albert,

    Thank you for your quick response.

    I have discovered that the reason may be that the code given by LinkedIn's developer section are scripts.  Apparently JotForm does not allow the use of scripts in the Free Text (HTML) areas, due to security concerns.

    Since I am unable to do what I was trying to do, I have compromised by simply adding a "Follow Us on LinkedIn" button that is linked to the URL of the company page.