# View Record Details on Parent Page

> Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…

Source: https://tadabase.com/docs/snippets/view-record-details-on-parent-page  
Status: Not yet re-checked. Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

> **Warning:** Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add this functionality is through the plugin installation wizard. Learn more about plugins [here](https://tadabase.com/docs).

**Here is a demo link to view the example**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-31_15-41-59.png)

Here is a great way to customize the details page to be viewed on the parent page by an action button. Follow the steps below to complete this process.

**Step 1**

**Create a text field in your Data Table and name it “recordId.”**

![recordId field](https://community.tadabase.io/uploads/default/original/2X/2/226cac4dab1e1240c61c3744561009e84e0064fd.png)

**Step 2**

**Create a table rule that says: On Create or Edit, set {recordId} to a record value of (Record ID)**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_00-08-01.png)

**Step 3**

**Create an equation field and paste the following equation.**

> CONCAT('<button',CHAR(32),'recordId="',{recordId},'"',CHAR(32),'id="detailsLink"',CHAR(32),'class="btn',CHAR(32),'btn-block',CHAR(32),'btn-primary',CHAR(32),'loadIntoIframe">VIEW</a>')

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_00-15-15.png)

**Step 4**

**Create a new row with an HTML component on the parent page where you wish to display record details.**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_00-20-19.png)

**Step 5**

**Paste the following HTML into the source code <> of the HTML component.**

```
<p><iframe id="my-iframe" class="taskDetails" name="detailsIframe" width="100%" height="800px" frameborder="0"></iframe></p>
```

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_00-23-37.png)

**Step 6**

**Paste the following CSS into the page CSS tab.**

```
 @media only screen and (min-width: 992px) {

     .taskDetails {

         color: black;

         background-color: #fff;

         height: 100vh;

         /*Sets the width of the side bar*/

         width: 400px;

         position: fixed;

         top: 0;

         /*Positions the side bar next to the Main Menu - 125px is the width of the menu*/

         right: 0px;

         z-index: 5;

         outline: none;

         overflow-y: hide;

         border-left: 2px solid #eeeeee;

     }

     .t-pagecontainer {

         margin-right: 400px;

     }

 }
```

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_00-29-09.png)

**Step 7**

**Paste the following into the JS tab of the page**

```
TB.render('component_3', function(data) {
    $('.loadIntoIframe').each(function() {
        var recordId = $(this).attr('recordid');
        $(this).click(function() {
            $('#my-iframe').attr('src', 'details_URL_goes_here' + recordId);
        });
    });
});
```

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_00-31-51.png)

**Step 8**

**Create a new layout with no menu, breadcrumbs, or user menu. We want this layout to be completely blank.**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_01-04-39.png)

**Step 9**

**Create a parent + details page in the new layout for the data table you worked with in the previous steps.**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_01-14-13.png)

**Step 10**

**Preview the parent page you just created, go to the details page, and get the URL for the details page. Copy the URL without the record ID.**

> **Note:** **Go back to step 8 and paste your details URL where it says “details_URL_goes_here.”**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_01-18-13.png)

**Step 11**

**Get the component_id for your data component on the parent page with the iframe.**

> **Note:** **Go back to step 8 and replace “component_3” with your component_id**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_01-27-49.png)

**Step 12**

**On the page containing your iframe, ensure the equation field with the details link is visible in your data component.**

![Screenshot for “View Record Details on Parent Page”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-08/scaled-1680-/2022-08-26_01-30-31.png)

**Preview the page and click the button!**

**Original Community Post:**

[https://community.tadabase.io/t/view-record-details-on-a-parent-page/1175](https://community.tadabase.io/t/view-record-details-on-a-parent-page/1175)
