How can I remove the heading/navigation bar from the modal?

I was able to create a modal inside my form using a custom button placed within a text field. Here’s the code I used inside the text field:

<a id="custom-modal" href="javascript:void(0);" style="cursor: pointer; color: #007bff; font-weight: 600;">
    <i class="fas fa-external-link-alt me-1"></i> View Terms, Policies and Agreements
</a>

And I added this script in the custom code section:

<script>
    document.addEventListener('click', function(e) {
        const target = e.target.closest('#custom-modal');
        if (target) {
            e.preventDefault();
            window.openSwModal('https://www.yourwebsite.com/terms', 'lg');
        }
    });
</script>

The modal opens as expected, but it includes a navigation bar or header that I would like to remove. Is there a way to hide or remove the navigation/header from the modal window? Any help would be appreciated.

Hi,
The navbar you have in /terms appears in the modal? Did you check it in live mode? The navbar can appear sometimes in preview mode.

1 Like

Oooh!, the nav does not show in live… Thanks alot i was using the preview mode :slightly_smiling_face:

1 Like

You’re welcome!

1 Like