You can use an HTML embed field to embed content into an event form via Smartabase Online or the Smartabase Classic mobile app. There are two scenarios where you might provide an HTML embed field for people to use:
- To create a clickable link to another website.
- To embed content from an external source (e.g. a video) using an iFrame.
To embed content from an external source (e.g. a video) with an HTML embed field, your Smartabase site needs to be configured specifically in the back-end by Smartabase to enable this, otherwise the external content will be blocked. By allowing the content to be shown in Smartabase, you are confirming that you trust the source domain and that you are liable to any risk associated with allowing this content through. For more information, please refer to the Smartabase privacy policy. If you agree to these terms, contact your Smartabase consultant and they can set this up for you on request.
Configuring the HTML placeholder
When setting this field up in an event form, an HTML placeholder must be added in the fields Advanced properties.
To embed an iFrame (e.g. to display a video from Youtube), use the following placeholder:
<iframe width="560" height="315" src="https://www.youtube.com/embed/$EMBED$" frameborder="0" allowfullscreen></iframe>
If using a different video platform, you'll need to get the embed code from the platform.
The screenshot below provides an example of how the embedded video will appear in the form.
To embed a clickable link to a website, use the following placeholder:
<a href="https://www.domain.com/embed/$EMBED$" target="_blank">Text to display</a>
Replace "www.domain.com" with the relevant URL domain and "Text to display" with the text that you want to display in the clickable link. target="_blank"
will ensure that the link is opened in a new tab.
The screenshot below provides an example of what the clickable link will look like in the form.
When entering data into a form containing an HTML embed field, the field will appear with a text box and an Update button. People will need to enter the identifying string from the URL into the text box provided. This must not include the part of the URL that is configured in the HTML placeholder property. For example, if the link to the external content is https://youtu.be/BHrrDYS6pyY or https://www.google.com.au/maps, only the unique part of the URL (“BHrrDYS6pyY” or “maps”, respectively) needs to be entered. Since the people using the HTML embed field in a form won’t be able to see the HTML placeholder, it is important that you provide adequate instructions for them to be able to use the field. It is recommended that you provide instructions in the form to identify which placeholder has been set up for the field and how to enter the unique ID string into the HTML embed field.
Steps to build a form that uses an HTML embed field
- Log into the builder interface.
- Select the Event forms tool.
- Select New event form from the Options drop-down menu.
- Name and categorize your new event form.
- Add an HMTL embed field from the sidebar.
- Go to the Advanced properties tab for the field and enter the relevant placeholder into the HTML placeholder setting, ensuring that you've updated the URL domain and format to suit your requirements.
- For clickable links:
<a href="https://www.domainname.com/$EMBED$" target="_blank">Click here to open the link</a>
. - For external content in an iFrame:
<iframe width="560″ height="315″ src="https://www.domainname.com/embed/$EMBED$" frameborder="0″ allowfullscreen></iframe>
- For clickable links: