Skip to main content
Question

Minimizing side menu when opening a pop up


Forum|alt.badge.img+4

Any options/tricks for minimizing the side menu when opening a pop up from a rich text button?   

What I notice is if the side menu is expanded in my parent page it will also be expanded in the pop up... ideally I want to always minimize the side menu in a pop up

MarkShnierYou
Forum|alt.badge.img+24

.. are you using New forms or Legacy forms?


Forum|alt.badge.img+4

New Forms


Forum|alt.badge.img+4

Much appreciated Mark.   Below is the html portion I'm currently using for that button

 

"<div style='display: flex; background-color: #3e62d6; padding: 5px 15px; font-size: 12px; border-radius: 25px; width: 200px; height: 30px; align-items: center; justify-content: center;'><a style='color:white; text-decoration: none;' class='OpenAsPopup' data-height=500 data-width=750 data-refresh=true href='" & $url & "'>Add Sales Approval</a></div>"


MarkShnierYou
Forum|alt.badge.img+24

Wow, I think I even impressed myself.

Here is my button to add child in popup.

 

var text url = URLRoot() & "db/" & [_DBID_CHILD] & "?a=API_GenAddRecordForm&dfid=11&_fid_7=" & URLEncode ([Record ID#]) & "&ifv=1&hs=1" //hide the qb menus including that sidebar and hide the save button 

& "&NextURL=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=11");  // Open code page 11 to close the popup  note that its just a coincidence the page ID=11 and the form ID in my example was 11

"<div style='display: flex; background-color: #3e62d6; padding: 5px 15px; font-size: 12px; border-radius: 25px; width: 200px; height: 30px; align-items: center; justify-content: center;'><a style='color:white; text-decoration: none;' class='OpenAsPopup' data-height=500 data-width=750 data-refresh=true href='" & $url & "'>Add Sales Approval</a></div>"

 

So that will open the popup.  But there will be no save button.

Then make a code page called perhaps CloseWindow.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
  window.close();
</script>
<body>

</body>
</html>

Then make a URL formula field for the popup child table form called Save and Close

URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=11" // change the 11 to the ID of your code page.

I'm not a coder but I seemed to have assembled pieces that work from this Quickbase app here.

https://resources.quickbase.com/nav/app/bq8kmgrcq/table/bq8meiyhh/action/dr?key=21

 

 


Forum|alt.badge.img+4

You are an absolute rock star.     Worked perfectly.   And I already had the close window code page worked into a button on the child form so it worked seamlessly.   

Many thanks