How to set up a 'Paypal field' combined with conditions

  • Profile Image
    Asked on January 23, 2014 at 09:50 AM


    we're trying to set up a form that contains (amongst others) a selection field and a paypal field. 

    The user will firstly choose the name of the doctor he wishes to see. Then, based on this selection, we wish to show a paypal field that shows only those treatments that are proposed by the selected doctor.

    The first part of this, having a field shown or hidden based on a selection, that we have done. However we thought that the solution was to include multiple paypal fields (and have the correct field with the correct treatments shown automatically).

    However, there is only one paypal field possible.

    So the question: how do we give the visitor the choice of ONLY the treatments based on  the choice of doctor ?


    Thanks for your help !

  • Profile Image
    Answered on January 23, 2014 at 10:17 AM


    Sorry but there is no direct solution to that. A workaround is to create multiple payment forms with each of them has the defined treatments (products). And then embed these forms to another clean form containing only a dropdown field to do the hide/show conditions. This is similar to the idea on this guide:

    Let us know if you have further questions or if you need further clarification about this.


  • Profile Image
    Answered on January 24, 2014 at 05:11 AM


    thanks for your answer. I've set it up as in your guide, but for some reason the script embed code for the separate forms keeps disappearing... 


  • Profile Image
    Answered on January 24, 2014 at 08:22 AM


    Yes the <script> portion is being stripped off due to security reason this is to sanitize the field so it won't allow any malicous code embedded into it. You can use the iFrame code instead of the ordinary embed code. With iframe the <script> tag will automatically be removed when you apply the changes leaving the <iframe></iframe> code.

    Let us know if you are still having problem applying this changes to your form so we could help you.

  • Profile Image
    Answered on January 24, 2014 at 08:48 AM

    I'm sorry, I don't quite understand what you mean by 'leaving the iframe' codes

    I've tried replacing the <script> with <iframe> and </iframe>, but as soon as I save this, it is replaced with a small window containing a lot of code:

    /*jslint nomen:false, debug:true, evil:true, vars:false, browser:true, forin:true, undef:false, white:false */


     * Includes a Form with javascript

     * @param {Object} formId

     * @param {Object} initialHeight

     * @param {Object} iframeCode


    function FrameBuilder (formId, appendTo, initialHeight, iframeCode){

        this.formId = formId;

        this.initialHeight = initialHeight;

        this.iframeCode = iframeCode;

        this.frame = null;


    and 15 more pages like this...


    In my original code I'm trying to insert, there is no Iframe at all:


    <script type="text/javascript" src="//"></script>


  • Profile Image
    Answered on January 24, 2014 at 09:41 AM


    Sorry for not making a clear instruction. You need to get an iframe code instead of using your embed code. Here's a guide on how to get an iframe code:

    Once you have your iframe code paste it on HTML section:


    Here's a sample of an iframe code:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//" frameborder="0" style="width:100%; height:465px; border:none;" scrolling="no"></iframe>

    <script type="text/javascript">window.handleIFrameMessage = function(e) {var args =":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight" = args[1] + "px";break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>