Skip to content

Display a web-published graph from a Google Sheet, or other web content in an iframe.

License

Notifications You must be signed in to change notification settings

ArslanArdavic/display-iframe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Display iframe

display-iframe field plug-in

Description

This field plug-in allows you to display content from a web source in an iframe as part of your form. The principle tested use case is displaying a web-published Google sheet graph, but the field plug-in may work well for other use cases. The content to be displayed needs to be public so sensitive information should not be shared this way. It uses an internet connection to display content.

Download now

Features

  • Supports displaying content that can be embedded in an iframe using a URL.
  • Supports displaying the last update time, which is the last time the content was updated.
  • Supports refreshing the content using the refresh button.

Data Format

The plug-in requires the text field type. The field stores the following values:

  1. success - if the graph loads successfully.
  2. fail - if the graph fails to load.

NOTE - The following message will appear if the plug-in is having issues with connectivity - Sorry, this is taking a while! Are you connected to the internet? Wait a few moments, and try the Refresh button.

The last updated time is recovered from the field plug-ins metadata using the plug-in-metadata() function.

How to use

  1. Download the test form extras/sample-form from this repo and upload it to your SurveyCTO server.
  2. Download the display-iframe.fieldplugin.zip file from this repo, and attach it to the test form on your SurveyCTO server.
  3. Make sure to provide the correct parameter (see below).

Parameters

Key Value
link (required) The link to the web-published content to be displayed in the iframe. For Google Sheets, you can follow the steps in this article to get the link to your chart.

Example:

To display this sample chart in the form, you would have the following in the appearance column:

custom-display-iframe(link="https://docs.google.com/spreadsheets/d/e/2PACX-1vTD80eAbc3rcSYPu4hMoCOZDkyKZ0kD5SZ2FowYN-EXWlN0jrP4T22osV_P_9DgrJJum4FwFtt11NkX/pubchart?oid=148310736&format=interactive")

More resources

About

Display a web-published graph from a Google Sheet, or other web content in an iframe.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.0%
  • CSS 25.1%
  • HTML 12.9%