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

    adding an ad to your form

    Asked by poopselfie on February 23, 2014 at 03:09 PM

    Is it possible to insert a javascript code such as a google adsense mobile ad into an element and have it appear on the form? Like could I inject a code into a text field and have it read the javascript and show the ad?


    If you view this link on a phone, I have elements hidden on desktop view and showing on mobile view. Could I add an ad to appear on mobile only? or add an ad at all?


    View the attached link on mobile 

    Page URL:

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 23, 2014 at 04:36 PM


    Unfortunately, it is not possible to inject any script codes on the text field. We do not allow it anymore for security reasons. You can only achieved that when you take and edit your form source code. After that, add the element ID on the media query injected to your form.


    #id_99{display:none;} /*hidden on desktop*/

    @media only screen and (min-device-width : 320px)and (max-device-width : 480px) {

    #id_99{display:inline;} /*show on mobile*/

    .form-all {width: 320px !important;}

    .form-image {display:inline;}




  • Profile Image

    Answered by poopselfie on February 23, 2014 at 06:26 PM

    Is it safe to say that if i were to create a text field on my form and insert some text such as "ad will go here" and inject css to hide it on desktop and show on mobile, then grab the source and paste it into my index.html, i could replace that "ad will go here" with an ad script and it will give me the desired effect?

  • Profile Image
    JotForm Support

    Answered by ashwin_d on February 23, 2014 at 09:49 PM

    Hello poopselfie,

    Yes it is possible to achieve your requirement.

    You can download your form's source code and add any type of scripts to get your desired output.  It's just that you will not be able to upload the source code back to JotForm.

    Thank you!