How to pass field value to Iframe embedded in an Text(html) field?

  • websiteNKvF
    Asked on October 10, 2016 at 2:05 PM

    Hi,

    I have in a form a listbox with multiple google spreadsheetkey's. In the form I want to show a iframe containing the google spreadsheet depending on the chosen spreadsheetkey. So i want this iframe with key:

    <iframe src="https://docs.google.com/document/d/15JVB0PQ6kWbTARjJH2Ogf0E9FPZJf1LOm-4Vtb6teCI/pub?embedded=true&amp;headers=false&amp;chrome=false" width="900" height="850" scrolling="no"></iframe>

    to be replaced with:

    <iframe src="https://docs.google.com/document/d/{spreadsheetkeys}/pub?embedded=true&amp;headers=false&amp;chrome=false" width="900" height="850" scrolling="no"></iframe>

    But the code above is not working, what am i doing wrong?

    Thanks in advance!

    G. Wentink

  • David JotForm Support Manager
    Replied on October 10, 2016 at 4:47 PM

    Unfortunately, it is not possible to pass a field value into an Iframe you have embedded into the Text(free text html) field.

    What you can do is to embed each document into different Text fields, and show them based on the key selected by creating the following conditions:

     

     How to pass field value to Iframe embedded in an Text(html) field? Image 1 Screenshot 30

    Result: https://form.jotform.com/62836151022952 

    How to pass field value to Iframe embedded in an Text(html) field? Image 2 Screenshot 41

    You can clone my form if you want to, and use it: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if you need more help, we will be glad to assist you.

  • websiteNKvF
    Replied on October 10, 2016 at 5:11 PM

    Thank you for your help. I had considered that solution. I will look into it.