Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Design & Build
Unanswered

Open List actions in same window as list

(1) ShareShare
ReportReport
Posted on by
Hey,
I implemented a list on my power pages website and enabled the action "Create a new Record" with the Target type webpage.
By default the webpage then opens in a new tab when clicking on create.
How can I change my settings to open the webpage in the same tab as the list?
 
Categories:
  • Suggested answer
    Jon Unzueta Profile Picture
    746 on at
    Open List actions in same window as list
     
     

    To make the "Create a new record" action in a Power Pages list open in the same tab instead of a new one, you can adjust this behavior using JavaScript customization or by modifying the list configuration in the portal management app.

    Here’s how you can approach it:


    Option 1: Use JavaScript to Override Target Behavior

    If the list is rendered using the standard Power Pages list component, you can inject JavaScript to override the default behavior of opening in a new tab.

    Steps:

    1. Go to your Power Pages site.
    2. Open the Web Page where the list is embedded.
    3. Add a Web Page Script or custom JavaScript in the page’s source or via a Web File.

    Sample Script:

    <script>
      document.addEventListener("DOMContentLoaded", function () {
        const createLinks = document.querySelectorAll("a[data-action='create']");
        createLinks.forEach(link => {
          link.setAttribute("target", "_self");
        });
      });
    </script

    This script finds the "Create" action links and forces them to open in the same tab (_self).


    Option 2: Use Entity List Configuration (Portal Management App)

    If you're using the Portal Management app:

    1. Go to Entity Lists.
    2. Open the list you're using.
    3. Scroll to the "Create" section.
    4. If you're using a Web Page as the target:
      • Ensure the Target Type is set to Web Page.
      • The default behavior is to open in a new tab, but you can override this with JavaScript as above.

    Option 3: Use Modal Dialog (Alternative UX)

    If you want to avoid navigation altogether, consider using a modal dialog for record creation. This requires more advanced customization using Liquid + JavaScript + Web API, but it provides a smoother UX.

     

    🏷️ Tag me if you have any further questions or if the issue persists.

    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.

    ❤️ Give it a Like if you found the approach useful in any way.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Pages - Design & Build

#1
oliver.rodrigues Profile Picture

oliver.rodrigues 33 Most Valuable Professional

#2
Fubar Profile Picture

Fubar 22 Super User 2025 Season 1

#3
JB-10040341-0 Profile Picture

JB-10040341-0 18

Overall leaderboard

Featured topics