adding an ad to your form

  • Profile Image
    Asked 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 

  • Profile Image
    Answered 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 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
    Answered 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!