Forum Discussion
6 Replies
- MarkShnier__You
Qrew Legend
.. are you using New forms or Legacy forms?
- MarkShnier__You
Qrew Legend
I have an idea that might work. Can you post the code for the Rich Text field?
- JennasonQuick_BQrew Trainee
New Forms
- JennasonQuick_BQrew Trainee
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>"
- MarkShnier__You
Qrew Legend
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
- JennasonQuick_BQrew Trainee
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