# Form Features - IFrame

## Overview

The **IFrame** element embeds a web page inside a SharinPix Form. Use it for procedures, maps, or dashboards. You can also embed content exposed through [**SharinPix Share**](/documentation/lightning-web-component/sharinpix-share.md). Set the URL with a formula. This makes it dynamic per record.

This article covers:

* [How to configure the IFrame (URL and aspect ratio)](#iframe-element-configuration-in-the-form-template-editor)
* [Fire Inspection Demo: Configure a dynamic IFrame using a prefilled URL](#fire-inspection-demo-configure-a-dynamic-iframe-using-a-prefilled-url)

{% hint style="warning" %}
**Prerequisites:**

Before using the IFrame element:

* Ensure the [**SharinPix Forms Admin**](/documentation/access-and-security/sharinpix-permission-sets.md) permission set is assigned.
* The **latest version of the SharinPix Package** must be installed. Refer to [*this documentation*](/faqs/how-to-update-sharinpix-package-from-the-appexchange.md) to update your package.
* Ensure end users can access the embedded URL (network access and authentication).
  {% endhint %}

{% hint style="info" %}
**Use Case Example: Show SharinPix Albums in a form**

The iFrame element can be used to embed a [SharinPix Album component](/documentation/lightning-web-component/sharinpix-album-lwc.md) in a form. To generate shareable SharinPix album URLs, you can either:

1. Use the [SharinPix Share component](/documentation/lightning-web-component/sharinpix-share.md) to manually generate a URL
2. Or automatically generate URLs as documented [here](/documentation/cookbook/generate-sharinpix-shareable-album-links-automatically.md).
   {% endhint %}

## IFrame element configuration in the Form Template Editor

Configure IFrames in the [SharinPix Form Template Editor](/forms/form-elements/sharinpix-form-template-editor.md).

### Configure IFrame element with a static URL

#### Add the IFrame element

Open your form template in the Form Template Editor. Find **IFrame** in the element palette. Drag it into your form.

#### Configure the IFrame settings

Select the IFrame element. Configure these parameters:

* **URL**: a [formula](/forms/form-elements/sharinpix-form-formula-functions-and-operators.md) that resolves to a URL string
* **Aspect Ratio**: controls the IFrame height relative to its width

<figure><img src="/files/B6KQN4y0lHJLMkWamU18" alt=""><figcaption></figcaption></figure>

#### Set the URL (example)

Use a quoted string as a static URL:

* URL: `"https://example.com"`
* URL: `"<your-sharinpix-share-url>"`

{% hint style="info" %}
**Dynamic URLs**

You can build the URL dynamically per record. Jump to [Dynamic IFrame element with a dynamic URL](#fire-inspection-demo-configure-a-dynamic-iframe-using-a-prefilled-url).
{% endhint %}

<figure><img src="/files/n1EcAHb4BIZwgIlh1MlX" alt=""><figcaption></figcaption></figure>

### Fire Inspection Demo: Configure a dynamic IFrame using a prefilled URL

#### Step 1: Generate URL

Generate a [dynamic Share URL](/forms/salesforce-integration/generate-sharinpix-shareable-form-links-automatically.md) for the record where the form is launched.

#### Step 2: Prefill URL

* Add a **Text** question.
* Set an API name for the question (example: `album_share_url`).
* [Prefill](/forms/form-elements/form-features-default-or-prefill-values.md) it with the field name storing the Share URL (example: `Share_URL__c`).
* Hide or disable the question.

<figure><img src="/files/AQKQJOesCsHanDJsbJis" alt=""><figcaption></figcaption></figure>

Make sure to set the api name of the text question to use it in a formula.

<figure><img src="/files/uNmi7J9zMjofJvC8woTb" alt=""><figcaption></figcaption></figure>

#### Step 3: Use the dynamic share URL

* Set the IFrame **URL** to your prefilled Text value.
* Use `<PrefilledTextApiName>.value` to reference the field value.

<figure><img src="/files/QeFxyY3Kwb6oVEMmlAqJ" alt=""><figcaption></figcaption></figure>

#### Step 4: Test in preview

Preview the form to test the embedded content. Share access follows the Share settings.

<figure><img src="/files/lGngnuqFVGYTVTPetb1t" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Note:**

* If you embed a SharinPix Share link, review its access level. Avoid edit access in read-only use cases.
* The IFrame element does not render in the PDF output.
* The IFrame is not limited to SharinPix Share: you can use any SalesForce public links
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sharinpix.com/forms/form-elements/sharinpix-form-sections-and-repeated-sections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
