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

    iFrame with Dynamic URL Based on URL Parameter

    Asked by SportsForm on April 23, 2016 at 02:14 PM
    4) I want to embed an iframe with dynamic url into jotform, is it possible?
  • Profile Image
    JotForm Support

    Answered by Charlie on April 23, 2016 at 02:55 PM

    May we know more what you would like to accomplish here? I presume you needed to change the source URL in the <iframe> element?

    If you want to embed an iframe element in your form, that is possible using our iFrame Embed widget. You can also embed it on the "Text" field, it allows HTML code to be injected there.

    Here's a screenshot showing the "Text" field in our form builder.


    However, as mentioned on this other thread link, PHP and Javascript codes cannot be added on the form using our form builder, but can be done if you'll use the form's full source code. I presume what you want to do is to dynamically change the source URL in the iframe element based on some conditions? If that's the case, you might need to use the full source code then.

  • Profile Image

    Answered by SportsForm on April 23, 2016 at 11:49 PM

    Hi Charlie,

    I want to set a placeholder in the iframe element in a jotform, when it's launched, I can replace that placeholder with an url that's passed through request params.

    Example: https://form.jotform.com/123456890?url=http%3A%2F%2Fmysite.com%2Fthank-you


  • Profile Image
    JotForm Support

    Answered by Chriistian on April 24, 2016 at 01:42 AM


    As my colleague suggested, you can add iFrame Embed widget to add iFrame to your form. Unfortunately, the src of the iFrame cannot be changed dynamically based in URL parameter. However, if you have some knowledge using PHP to get URL parameters, you can use PHP in your own page and you can add your form on that page using its form source (How to get the Full Source Code of your Form)You can then manipulate the src of the iFrame in your form using PHP.